LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   useradd Problem (https://www.linuxquestions.org/questions/linux-newbie-8/useradd-problem-135523/)

deepakjena_2003 01-16-2004 03:31 PM

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

TheOther1 01-16-2004 03:46 PM

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...

ScooterB 01-19-2004 08:21 AM

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.


All times are GMT -5. The time now is 07:01 PM.