LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 04-21-2006, 12:00 AM   #1
scbops
Member
 
Registered: Feb 2006
Posts: 97

Rep: Reputation: 15
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
 
Old 04-21-2006, 12:26 AM   #2
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
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.
 
Old 04-21-2006, 01:39 AM   #3
scbops
Member
 
Registered: Feb 2006
Posts: 97

Original Poster
Rep: Reputation: 15
still it gave the following error

error :-.................

passwd: user_u:system_r:unconfined_t is not authorized to change the password of roo
 
Old 04-21-2006, 09:45 PM   #4
GrueMaster
Member
 
Registered: Aug 2005
Location: Oregon
Distribution: Kubuntu.
Posts: 848

Rep: Reputation: 30
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
 
Old 04-24-2006, 12:10 AM   #5
scbops
Member
 
Registered: Feb 2006
Posts: 97

Original Poster
Rep: Reputation: 15
It work after I remount it ,

mount -o remount,rw <device-name>

anyway Thanks man.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Root passwd changed Tinku Linux - Security 9 10-22-2004 12:52 AM
root passwd Prasanth Linux - General 0 03-17-2003 05:12 AM
root passwd sparks Linux - Newbie 5 06-16-2002 07:25 AM
root login incorrect ,then passwd root,but error sunnycn Linux - Security 6 05-20-2002 10:54 AM
root passwd baburaj Linux - General 7 04-16-2002 12:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 05:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration