Red Hat This forum is for the discussion of Red Hat Linux. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
04-21-2006, 12:00 AM
|
#1
|
Member
Registered: Feb 2006
Posts: 97
Rep:
|
passwd root Error
1) I am using redhat advance server 4
2) want to recover my root password
3) I boot the box with as4 boot cd using linux rescue at prompt
4) then I mount the system with read-write mode
5) when I try to change the password using passwd root command it gave the following error
unable to starr pam
|
|
|
04-21-2006, 12:26 AM
|
#2
|
Member
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848
Rep:
|
You missed an important step. After mounting the drive, cd to the drive (what would normally be root when booting from the drive), and type "chroot ." You should now be in / of your installation, and can type "passwd" to change the root passwd.
Also, depending on your installation, you can boot into a failsafe sudo rescue mode without using the cd. Just add "single" to the boot command (in lilo, type "linux single", in grub, hit <esc> to get to the boot menu, then "e" to edit the boot menu, <enter> to save the change (temporary, not permanent), and b to boot.
|
|
|
04-21-2006, 01:39 AM
|
#3
|
Member
Registered: Feb 2006
Posts: 97
Original Poster
Rep:
|
still it gave the following error
error :-.................
passwd: user_u:system_r:unconfined_t is not authorized to change the password of roo
|
|
|
04-21-2006, 09:45 PM
|
#4
|
Member
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848
Rep:
|
The other option is to reboot in rescue mode, mount your root directory, and edit /etc/passwd. Change the follwoing line as follows:
root:$1$dL5vHy7c$R/1.GXWRTErRescKNlmQW1:0:0:root:/root:/bin/bash <--original (from my system - yours may vary
root::0:0:root:/root:/bin/bash <--New
If it originally looks like this "root:x:0:0:root:/root:/bin/bash" then you have password shadowing enabled (usually default). In that case, edit the /etc/shadow file the same way.
Also, if these methods don't resolve the issue, you can try to boot into single user mode (as described in my earlier post). If it also asks for a root password, you can disable that by editing /etc/inittab:
# What to do in single-user mode.
~:S:wait:/sbin/sulogin <-- change to /sbin/sh
|
|
|
04-24-2006, 12:10 AM
|
#5
|
Member
Registered: Feb 2006
Posts: 97
Original Poster
Rep:
|
It work after I remount it ,
mount -o remount,rw <device-name>
anyway Thanks man.
|
|
|
All times are GMT -5. The time now is 05:52 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|