"This account is currently not available" ... Please help

Support for security such as Firewalls and securing linux
saddafm
Posts: 1
Joined: 2016/03/12 04:11:11

"This account is currently not available" ... Please help

Postby saddafm » 2016/03/12 04:21:30

Hello everyone.
To make my system more secure I made a big mistake when changing the root account setting in /etc/passwd file. I changed the root account's shell to /sbin/nologin becase I wanted to login to the root by sudo su. Anyway, after doing that, I logged in by another user account ad then typed sudo su command in order to log in to root via my current account; however, I got this message "This account is currently not available".
Is there anyway to redo what I have done or anyway to access to root account from another user account?

darkeale
Posts: 12
Joined: 2015/04/14 11:10:53

Re: "This account is currently not available" ... Please hel

Postby darkeale » 2016/03/12 11:38:45

Hi,

You might be able to fix this by booting from a live CD, mounting the partition where your filesystem is stored and then editing the file from there?

User avatar
TrevorH
Forum Moderator
Posts: 21170
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: "This account is currently not available" ... Please hel

Postby TrevorH » 2016/03/12 12:19:28

Use sudo su -s /bin/bash
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke