LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
LinkBack Search this Thread
Old 01-23-2004, 05:26 PM   #1
mht17
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!

Thanks,

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

Rep: Reputation: 64
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.

How?

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:
root:x:0:0:root:/root:/bin/bash
Remove that "x"
Then in /etc/shadow:
root:TYe70.hPT9S9AuueYXtc.:12299:0:::::
Remove those wierd characters (the TYe70...), save and exit. Now reboot, and hope it all worked

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

Original Poster
Rep: Reputation: 0
MasterC,

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!

Regards,

Michael T.
 
Old 05-10-2011, 06:23 PM   #4
wiliamvw
Member
 
Registered: Mar 2008
Location: Pittsburgh
Distribution: openSUSE 11.4 on GoBooks
Posts: 89

Rep: Reputation: 15
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.
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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 11:35 AM
Limiting the number of root user accounts barleykorn Linux - General 2 03-25-2005 10:51 AM
can i view user accounts with root? guggenheim Linux - General 2 03-17-2004 05:35 PM
programs won't run on user (non-root) accounts....? once here Slackware 16 12-02-2003 08:44 AM
Disabled access to user accounts! HELP! Adeas Mandriva 2 09-07-2003 08:17 PM


All times are GMT -5. The time now is 02:23 PM.

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