Root Account Boo-boo

Support for security such as Firewalls and securing linux
Post Reply
mike6182
Posts: 2
Joined: 2007/01/11 22:34:47

Root Account Boo-boo

Post by mike6182 » 2007/01/11 22:49:34

In trying to secure my Cent-OS4 server I followed instructions found on the Internet to make the following changes:

as Root change /etc/passwd Root:x:0:0:0:Root:/Root/bin/bash to Root:x:0:0:0:Root:/Root/sbin/nologin
and /etc/ssh/sshd_config to PermitRootLogin no. Now I am unable to to write files or log in other than any user that I have configured. I am now even unable to get back to the files and change them back. When I try to log in as root even from a console directly connected I get This account is unavailable at this time.Would it be possible to load Knoppix and then have root capabilities?

pjwelsh
Posts: 2598
Joined: 2007/01/07 02:18:02
Location: Central IL USA

Re: Root Account Boo-boo

Post by pjwelsh » 2007/01/12 01:30:51

Knoppix would be a good easy choice. I'm glad you know about that. You can also try to boot into single user mode by interupting the default kernel boot (just after the bios screen), hit the "e" for edit, one down arrow key, then "e" for edit, hit the space bar once and type "single", the hit the ENTER key and finally hit the "b" key. This should drop you to a root shell prompt
But maybe knopix is better or the "linux rescue" from the original CentOS boot media

mike6182
Posts: 2
Joined: 2007/01/11 22:34:47

Re: Root Account Boo-boo

Post by mike6182 » 2007/01/16 15:43:24

The 'single' mode let me change things back to before I messed with it. Thanks for your help. :-D

Post Reply

Return to “CentOS 4 - Security Support”