LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 05-09-2016, 11:30 AM   #1
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Rep: Reputation: Disabled
reset root passwd in rhel 6


hi,

after editing the grub file from the starting menu with e and then booting with run level 1 , am not able to reset the root's user passwd.

PFA for reference.

Same procedure works in rhel 5 not in rhel 6.

Any other things needs to be done ??
Attached Thumbnails
Click image for larger version

Name:	rhel 6 passwd er.png
Views:	37
Size:	127.9 KB
ID:	21719  

Last edited by arun natarajan; 05-09-2016 at 11:32 AM. Reason: forgot attachment
 
Old 05-09-2016, 11:51 AM   #2
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Are you part of the wheel group? If so then you don't have to go to these extremes.

Simply login as yourself or a user that is part of the wheel group and run the following:
Code:
sudo bash
Give the user password then run the following:
Code:
passwd
Now set your new root password.
 
Old 05-09-2016, 12:03 PM   #3
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
have tried as suggested, but no success.

PFA for reference
Attached Thumbnails
Click image for larger version

Name:	er2.jpg
Views:	31
Size:	125.5 KB
ID:	21720  
 
Old 05-09-2016, 12:20 PM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Looking at your screen shot you are already root so there is no reason to do the 'sudo bash' thing as that just gets you a root cli.
What I showed you was after a normal boot of the system.

What does the following command put out:
Code:
echo $PATH
How about
Code:
find / -name passwd
 
Old 05-09-2016, 10:40 PM   #5
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
[root@localhost ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@localhost ~]#
[root@localhost ~]# find / -name passwd
/bin/passwd
/etc/passwd
/etc/pam.d/passwd
/root/asp/d2/d21/d22/passwd
/usr/bin/passwd
/selinux/class/passwd
/selinux/class/passwd/perms/passwd
 
Old 05-10-2016, 08:04 AM   #6
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Hmmm,maybe selinux is causing you your issues. Look to see what current mode selinux is in with:
Code:
sestatus
If it is set to permissive then you can ignore the following.

If it is set to enforcing try the following:
Code:
setenforce 0
Then try to reset your password again.

After you are finished:
Code:
setenforce 1
If SeLinux was causing you your problems setenforce 0 temporarily set it to permissive mode and you should get warnings only but you should be able to reset your password. setenforce 1 set SeLinux enforcing once again.
 
Old 05-10-2016, 09:05 AM   #7
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
It worked by changing SElinux value from 1 to 0,

Ty a lot.
 
Old 05-10-2016, 09:23 AM   #8
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
Great, glad this worked.
 
  


Reply



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
Sort users in /etc/passwd by timestamp of last password reset anon091 Linux - Newbie 4 02-05-2016 07:43 AM
[SOLVED] forgot root passwd, kernel boot in single mode still asks for root passwd nass Slackware 11 05-08-2012 12:37 PM
Mysql: Any way to reset "root" passwd??? paulsm4 Linux - Software 5 03-08-2007 09:04 PM
passwd reset problem arguerin Linux - Security 2 08-09-2006 02:52 PM
System Wide Passwd Reset or Force outspoken Linux - Security 10 12-12-2004 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:41 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