LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2008, 04:04 AM   #1
kamariz
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Rep: Reputation: 0
root cannot change root passwd


hi all,

i'm using fedora 8. i got a problem where root cannot change root's password.

Quote:
[root@localhost ~]# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: Authentication token manipulation error
[root@localhost ~]#
i thought this problem cause by SELinux, but i SELinux is already disabled.

also in /etc, there is a file ".pwd.lock". what is that?

i try to disable root's password by editing /etc/shadow, but i just cannot chmod the shadow file.

Quote:
[root@localhost etc]# ll shadow
-r-------- 1 root root 1253 2008-02-01 07:47 shadow
[root@localhost etc]# chmod 755 shadow
chmod: changing permissions of `shadow': Operation not permitted
[root@localhost etc]#
Hope you guys can help me regarding this matter. Thanks in advanced.
 
Old 02-01-2008, 04:27 AM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
When you bootup into linux, at the bootprompt in grub/lilo add the param .. single ..this will boot into single user mode and there try and change the password.

(if you didn't understand how to boot into single user mode ... google for it )
 
Old 02-01-2008, 04:39 AM   #3
kamariz
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: 0
duryodhan,

thanks for replying.

i had try to change root's passwd in single user mode, but still got the same error.

"passwd: Authentication token manipulation error"

any other solution?
 
Old 02-01-2008, 05:30 AM   #4
kamariz
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: 0
hi guy :-)

problem solved..
Quote:
[root@localhost ~]# /usr/sbin/useradd aa
useradd: unable to open password file
[root@localhost ~]# chattr -i /etc/passwd
[root@localhost ~]# /usr/sbin/useradd aa
useradd: cannot open shadow password file
[root@localhost ~]# lsattr /etc/passwd
-------------- /etc/passwd
[root@localhost ~]# lsattr /etc/shadow
----i--------- /etc/shadow
[root@localhost ~]# chattr -i /etc/shadow
[root@localhost ~]# passwd
Changing password for user root.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]
Thanks.
 
Old 02-01-2008, 05:31 AM   #5
waelaltaqi
Member
 
Registered: Sep 2005
Location: USA, TN
Distribution: CentOS & Ubuntu for Desktop
Posts: 454

Rep: Reputation: 31
please retry and post the output from /var/log/secure

are you running local authencitation? i mean are you running any network authentication services like NIS or LDAP?

check permissions
Code:
user@Linux:~$ ls -l /etc/passwd /etc/shadow
-rw-r--r-- 1 root root   1442 2007-11-20 20:51 /etc/passwd
-rw-r----- 1 root shadow  909 2007-11-20 20:51 /etc/shadow
 
Old 02-01-2008, 06:28 AM   #6
kamariz
LQ Newbie
 
Registered: Jan 2007
Posts: 6

Original Poster
Rep: Reputation: 0
waelaltaqi,
thanks for replying.
problem solved already. the problem because of the attribute of the /etc/passwd and /etc/shadow that set to not to modified (chattr +i).

thanks.
 
Old 01-18-2012, 06:49 AM   #7
pablov2
LQ Newbie
 
Registered: Jan 2012
Posts: 1

Rep: Reputation: Disabled
I have problems...

I have tried with this solution but i cant change de +i mode

Code:
root@server3:/etc# /usr/bin/chattr -i passwd
root@server3:/etc# lsattr passwd
----i-------------- passwd
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Forgot root passwd!! :-( tomthebomb3 Linux - Newbie 10 10-29-2007 11:07 PM
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 - General

All times are GMT -5. The time now is 06:47 AM.

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