[SOLVED] passwd command not working in single user mode
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am going though a book trying to learn linux, one of the tasks is to change the root password by booting into single user mode.
According to what I have found after I get into single user mode I should just have to type in passwd and it should prompt me for a new password... but it doesn't. tried passwd root with the same effect, same with passwd -S and passwd -S root. Nothing seems to work
anything ya'll can think of I have over looked?
this is RH6
this does work in multi-user mode.
Last edited by schrodingore; 02-27-2012 at 12:55 AM.
How exactly did you enter single user mode? Explain in detail what you did. What's the output of
Code:
which passwd
I just tried it on a fresh install of RHEL 6.2 and it works as expected. Unless you've set up your system 'out of the ordinary' you should be able to use passwd.
Looking forward to your participation in the forums. Have fun with Linux.
I am not very sure if I can answer that correctly but in RHEL 6 it is not possible to change password using single user mode.
Even I had faced this thing and came up with the command which already posted
If you are satisfied with the solution kindly mark the thread as " solved " as it may help others
In redhat 6 you won't be able to change your root password from single user mode
try this in single user mode
Code:
#passwd -d root
this will delete your root password.
So that you can create a new password at next login for root
Hi,
Nice call, but can you elaborate a bit on why it doesn't work in RHEL 6? I just tried it on a RHEL 6.2 installation and it works as usual, just running passwd from the console in single user mode.
notabley I havn't figued out how to update it yet (still getting a "this system is not registered with RHM") so that could be my issue.
Moved from Cisco to Linux so trying to figure this stuff out :-P
Thanks again for all the help
Hi,
Without registering your system with RHN (Red Hat Network) you don't have access to updates. So first you'll have to run:
Code:
rhn_register
If you haven't paid for a subscription from Red Hat then you will not be able to update your system once the trial period is over. You should know that Red Hat is not free, so you either pay for a subscription and use their network for your updates or you change to a free clone of Red Hat, like CentOS or Scientific Linux. The fact that your system is not registered with Red Hat has nothing to do with the fact that you cannot change your root password in single user mode AFAIK.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.