Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-23-2004, 06:26 PM   #1
LQ Newbie
Registered: Jan 2004
Location: California
Distribution: RedHat 9
Posts: 4

Rep: Reputation: 0
Root and all user accounts disabled

This week I installed RedHat 9 and got the services and applications configured about right. Today I went to modify the user accounts and group memberships. Among other things, I disabled password and account expiration for all accounts, and then did a reboot.

Now I can't log in on any account, including root. When I enter the password, there is a very quick message that the account is disabled. Then the login prompt reappears.

How can I get in to the system to restore access? This has got to qualify as a real newbie question, but I'd really appreciate any advice!


Michael Thomas
Old 01-23-2004, 07:22 PM   #2
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 69
I'd boot up in rescue mode, then edit the /etc/passwd and/or the /etc/shadow file and remove the password for root, reboot, and hope it all works.


Plop in your install CD, and choose rescue mode (or somehow get to a command prompt from your install CD). Then, mount up your root filesystem ( / ) somewhere easy, something like:
mount /dev/hda1 /mnt/stuff
Assuming /dev/hda1 is the partition containing your root filesystem (which should contain /etc ). Then, using a command line text editor, edit the files mentioned above, and remove the following:
in /etc/passwd:
Remove that "x"
Then in /etc/shadow:
Remove those wierd characters (the TYe70...), save and exit. Now reboot, and hope it all worked

Old 01-24-2004, 01:00 AM   #3
LQ Newbie
Registered: Jan 2004
Location: California
Distribution: RedHat 9
Posts: 4

Original Poster
Rep: Reputation: 0

Thanks for getting back to me. I followed your scheme, saved, rebooted, and got back to work. You saved me a lot of thrashing around!


Michael T.
Old 05-10-2011, 07:23 PM   #4
Registered: Mar 2008
Location: Pittsburgh
Distribution: Suse, Slack,Uberstudent, Zorin, SL, Bugtraq
Posts: 304

Rep: Reputation: 16
root disabled via shell

This is just a note for general information regarding having one's root access disabled. On using su, got: su: zsh: no such file or directory and on logging in as root got: xsession: login for root is disabled. This applied to many root access areas, but fortunately not to control center, where was able to find out that in using zsh, my primary login shell had been changed to zsh, so using list of options to switch back to /bin/bash fixed the problem -- you'd have a hard time guessing that from the messages that were displayed.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to create user root accounts - SuSE 92 jdaniel Linux - Software 3 07-29-2005 12:35 PM
Limiting the number of root user accounts barleykorn Linux - General 2 03-25-2005 11:51 AM
can i view user accounts with root? guggenheim Linux - General 2 03-17-2004 06:35 PM
programs won't run on user (non-root) accounts....? once here Slackware 16 12-02-2003 09:44 AM
Disabled access to user accounts! HELP! Adeas Mandriva 2 09-07-2003 09:17 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration