passwd command not working in single user mode


 
Thread Tools Search this Thread
Operating Systems Linux passwd command not working in single user mode
# 1  
Old 09-10-2012
passwd command not working in single user mode

dear all

in single user mode i want to change password in RHEL server 6.0 (Santiago)
i tired using passwd command it is not able to change.

how to change it.

thanks in advance
# 2  
Old 09-10-2012
That is probably because some services are not running. Whose password are you trying to change? You can edit /etc/shadow directly. A blank entry(NULL) in the /etc/shadow password field allows that user to login without asking for a password.

Unless this is a toy system, reboot, and then run passwd as usual for the user you set with a blank password.

Example "blank" password field in /etc/shadow, note that I left out other fields, do not mess with them.
old account with password:
Code:
someuser:JPpZ.aLiLPtPQ:15102::::::

new no password:
Code:
someuser:::::::

I am guessing you are doing this with the root user.
# 3  
Old 09-10-2012
Do you have SELinux enforcing?

Code:
 
getenforce

If this is set to enforcing then passwd wont work even at single user mode.

Code:
 
#setenforce 0
#passwd

this will turn SELinux off and then the password command should work for you.
This User Gave Thanks to Tommyk For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Single user mode

Dear All I am trying to install my os as : ok>boot cdrom - install but receiving the following : "IDprom checksum error getexecname() failed /sbin/rcS /etc/vfstab cannot create INIT:failed write utmpx enrty INIT:single user mode INIT:execle of /etc/sulogin failed Enter run level" Can you... (6 Replies)
Discussion started by: hadimotamedi
6 Replies

2. Solaris

Single user mode

Hi all I am new on sun OS. I have have little experience on linux. The Story start from this point: I want to put some script on start-up the terminal, but I cant do that. my shell was sh and I tried so much to find way to do that. at last someone said to me change your shell to bash. I ask how... (4 Replies)
Discussion started by: Rahim_T
4 Replies

3. UNIX for Dummies Questions & Answers

single user mode - user accounts passwords

hello ppl, someone must be able to help with this --> I have an old NCR tower 32 with an ADDS terminal running a unix version 020102 (Im not sure if thats correct but its unix for sure). I have no user names and no passwords and need to login to read a tape. Is there any way to do that? I hear... (3 Replies)
Discussion started by: orestis
3 Replies

4. UNIX for Dummies Questions & Answers

how to Single user mode?

How to enter single user mode when UNIX/LINUX system is starting? (1 Reply)
Discussion started by: gkreddy
1 Replies

5. Solaris

fsck not working in single user mode

My solaris10 machine suddenly hanged and when i rebooted it gave me warnings like "WARNING: Unexpected token ' ' on line 10 of /platform/sun4u/kernel/drv/sf.conf " and many more. I went into the single user mode by #boot cdrom -s I tried executing fsck -y there.But it did not work. It does... (1 Reply)
Discussion started by: lydiaEd
1 Replies

6. UNIX for Advanced & Expert Users

single user mode

How to diable the single user mode.. what i want is dat my users are unable to boot in single user mode via GRUB.. (1 Reply)
Discussion started by: ankit.jss
1 Replies

7. UNIX for Advanced & Expert Users

single user mode

Is there another way of switching to single user mode except by typing /usr/sbin/shutdown 0 ??? :rolleyes: (5 Replies)
Discussion started by: kekanap
5 Replies

8. UNIX for Dummies Questions & Answers

single-user mode

how do you boot into single user mode? RedHat 7.1 Caldera 2.4 (2 Replies)
Discussion started by: zorro81
2 Replies

9. UNIX for Dummies Questions & Answers

Single user mode

Hi all, Well back at work and back to crashing systems again :-) Does anyone know where I can find some decent information on single user mode? I need to be able to fix a few things. Don't know if it's possible in single user mode but I need to fix the "etc/vfstab" mainly I re-wrote it to... (2 Replies)
Discussion started by: merlin
2 Replies

10. UNIX for Dummies Questions & Answers

single user mode

Hi all, why "vi" acts differently is single user mode? Does anyone help ? I am using "x" to delete and it keeps messing up. Please help Thanks (2 Replies)
Discussion started by: guest100
2 Replies
Login or Register to Ask a Question