LinuxQuestions.org
Visit Jeremy's Blog.
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 01-16-2004, 04:31 PM   #1
deepakjena_2003
LQ Newbie
 
Registered: Jan 2004
Location: India
Distribution: Redhat
Posts: 1

Rep: Reputation: 0
useradd Problem


Hi,

i am facing problem while creating user in my servers..

when i execute "useradd <username>" command it's giving the following error message...

useradd: unable to open password file


i checked the permissions for both /etc/passwd and /etc/shadow file...

every thing is ok...

here i am placing the permissions of both the files...

-rw-r--r-- 1 root root 2553 Dec 10 09:17 /etc/passwd
-rw------- 1 root root 2498 Jan 13 10:59 /etc/shadow
-rw-r--r-- 1 root root 2438 Dec 9 09:35 /etc/shadow-


when i try to change the permission for /etc/shadow file it's giving the follwing error msg.....

chmod: changing permissions of `/etc/shadow': Operation not permitted

i executed all the above command as "root" user.....

kindly suggest me how to solve this issue.....


Thanks/Regards
Deepak
 
Old 01-16-2004, 04:46 PM   #2
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Quote:
-rw-r--r-- 1 root root 2553 Dec 10 09:17 /etc/passwd
-rw------- 1 root root 2498 Jan 13 10:59 /etc/shadow
-rw-r--r-- 1 root root 2438 Dec 9 09:35 /etc/shadow-
My files look like this:

Code:
-rw-r--r--    1 root     root         1526 Jan 14 13:56 passwd
-r--------    1 root     root         1098 Jan 14 14:00 shadow
-r--------    1 root     root         1044 Dec 31 16:08 shadow-
I know everything else is optional, but have you tried specifying shell, groups, home or any other parameters? It may give additional output...
 
Old 01-19-2004, 09:21 AM   #3
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
I don't know if this may be the issue or not but I have found myself doing it so maybe you did to. Make sure when you do things like this, you sign in using "su -" instead of "su". It allows a totally different path and more options. There should be no reason why as root you can't change those files permissions and access. Try that and repost.
 
  


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
useradd problem ruben0076 Linux - Newbie 4 01-11-2005 12:28 PM
useradd problem efanning Linux - Newbie 1 07-29-2004 08:24 PM
useradd problem giovannym Linux - Newbie 4 06-23-2004 08:59 PM
useradd -p problem gizbon Linux - General 4 11-11-2002 04:03 PM
useradd problem scatcat Linux - Newbie 3 06-21-2002 04:33 AM


All times are GMT -5. The time now is 07:06 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration