LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-12-2014, 03:24 AM   #1
seyiisq
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Rep: Reputation: Disabled
useradd: cannot rewrite password file


Hello All,

I am trying to add user as root and I keep getting the error as shown above.

useradd: cannot rewrite password file

I know i have SElinux in enforcing mode but not sure what t do to resolve this

Code:
[Machine]# getenforce
Enforcing
[Machine]#
Please, can anyone help
 
Old 08-12-2014, 03:47 AM   #2
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
It sounds as a very old bug. What's the distro you are running?
Try to disable SELinux.
 
Old 08-12-2014, 10:18 AM   #3
seyiisq
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks Kooru,

I am on REDHAT Release 4.
 
Old 08-12-2014, 12:57 PM   #4
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,985
Blog Entries: 4

Rep: Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037Reputation: 4037
FYI, if I were using SELinux, I probably wouldn't be using "password files" anyhow. This would probably be part of a larger system network which I would manage using Kerberos or LDAP (ActiveDirectory).
 
Old 08-12-2014, 02:20 PM   #5
seyiisq
LQ Newbie
 
Registered: Sep 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Thanks sundialsvcs,

We do not have that in place for our linux servers hence we are restricted to using Password file.
 
Old 08-12-2014, 02:44 PM   #6
kooru
Senior Member
 
Registered: Sep 2012
Posts: 1,385

Rep: Reputation: 275Reputation: 275Reputation: 275
But RHEL 4.0 or 4.x?
We're talking about a system released in 2005 and its supports will end between 6 months. Just for information.

have you tried disabling SELinux?
also check for *.lock files in /etc (in according with this)

Last edited by kooru; 08-12-2014 at 02:59 PM. Reason: add link
 
Old 08-12-2014, 03:05 PM   #7
Smokey_justme
Member
 
Registered: Oct 2009
Distribution: Slackware
Posts: 534

Rep: Reputation: 203Reputation: 203Reputation: 203
Hmm... Do an
Code:
lsattr /etc/passwd
first and see if there aren't any flags that block any modifications to the file (like the 'i' flag)
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Rewrite Password File Error Message rduckworth Linux - Server 2 02-28-2007 08:40 AM
useradd: unable to lock password file shivadk Linux - Networking 1 12-13-2005 03:20 AM
useradd without shadow password twallstr Linux - Software 1 09-08-2005 03:14 PM
Password Problems With useradd Jude Lucien Debian 4 08-18-2005 11:44 AM
"useradd: unable to lock password file" need help monzter Programming 1 08-16-2004 01:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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