Need help with user creation


 
Thread Tools Search this Thread
Operating Systems Solaris Need help with user creation
# 1  
Old 03-09-2010
Need help with user creation

Hello guys,

i have a problem where i cant create a user and here some problem that i encounter.

1. /etc/passwd seems locked.
2. getting this error UX: useradd: ERROR: Cannot update system files - login cannot be created.


Code:
# useradd -u 47367 -g 1084 -c "user123" -d /local/home/user123 -s /bin/ksh -m user123
UX: useradd: ERROR: Cannot update system files - login cannot be created.

Code:
# ls -ld passwd ; ls -ld shadow
-rw-r--r--   1 root     sys        21192 Feb 25 05:21 passwd
-r--------   1 root     sys        11151 Mar  9 23:23 shadow
#

When i run pwck, i encounter this.

Code:
# pwck

lp:x:71:8:Line Printer Admin:/usr/spool/lp:
        Login directory not found

uucp:x:5:5:uucp Admin:/usr/lib/uucp:
        Login directory not found

nuucp:x:9:9:uucp Admin:/var/spool/uucppublic:/usr/lib/uucp/uucico
        Login directory not found
        Optional shell file not found

sitescope:x:64101:64101:userabc (userabc@abc.com):/local/home/userabc:/bin/sh
        Logname too long/short

but as per based on no1 problem, i cannot edit /etc/passwd. Looks like / is OK.

Code:
Filesystem            kbytes    used   avail capacity  Mounted on
/dev/md/dsk/d1       6197861 2263849 3872034    37%    /

the needed files for useradd also available.

Code:
# for i in datemsk passwd shadow group skel user_attr;
> do
> file /etc/$i
> done
/etc/datemsk:   ascii text
/etc/passwd:    ascii text
/etc/shadow:    ascii text
/etc/group:     ascii text
/etc/skel:      directory
/etc/user_attr: ascii text


Looking forward any suggestion from you guys.
# 2  
Old 03-10-2010
You should be root to do this.
Use the useradd like this and see
Code:
useradd -u 47367 -g 18 -d /local/home/user123 -m -s /bin/ksh -c "user123"  user123

/local/home dire should be present, there should be no conflicting uid 47367 in the /etc/passwd file.you can grep to check. group 18 should be a valid group too. Whats your OS version, showrev ?
SEEMS like this file /etc/user_attr is missing or been deleted. Restore it and try
This User Gave Thanks to incredible For This Post:
# 3  
Old 05-09-2010
thank you, it helped me...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Automatic User Creation

Hello everybody, I'm new to sh scripting and relatively new to linux in general which is why I've come here for assistance. I have been attempting to make a shell script which automatically creates user accounts from a file list and further creating directories and moving files into it etc.... (3 Replies)
Discussion started by: charlieabee
3 Replies

2. UNIX for Dummies Questions & Answers

User creation - query

Hi, I want to create a user using useradd -m test. How can I restric the user not to change his directory from his home dir? Thanks, Suresh (2 Replies)
Discussion started by: suresh3566
2 Replies

3. Solaris

NIS user creation

Hi can anyone help me how to create a NIS user by editing the files like Passwd,group, Netgroup,auto.home and Aliases using the "enis" utility? Please do the needful................................ (4 Replies)
Discussion started by: Revathi@1
4 Replies

4. Shell Programming and Scripting

User creation script

Hi Gems.. I am working out on project of creating a mass user on 100 server. Please help me with script where i can create an user id of new 80 user using shell script Thanks in advance. Indrajit Bhagat (1 Reply)
Discussion started by: indrajit_renu
1 Replies

5. AIX

User creation

hi seniors i want to create the users like when the user try to login it should not should not promt for passwd is it possible to create users like this please help me (6 Replies)
Discussion started by: senmak
6 Replies

6. Red Hat

User creation

Hi Thanks in advance. How to create a user without useradd command ?? (1 Reply)
Discussion started by: krish4linux
1 Replies

7. Solaris

User Creation

i am trying to create a user on solaris 10. it is not taking user name with more than ten characters. which file i need to edit to do this setting. (4 Replies)
Discussion started by: raynu.sharma
4 Replies

8. Solaris

User creation

Hi all, I want to create one user with full permissions to one directory called /opt/tivoli/tsm/client/ba/bin. Name for the user Tivoli Thanks & Regards Babu (7 Replies)
Discussion started by: lbreddy
7 Replies

9. UNIX for Dummies Questions & Answers

user creation privileage

hello, How do I assign a user to create users other than root in linux . I want to create a users from other user. bye varma (4 Replies)
Discussion started by: jarkvarma
4 Replies

10. UNIX for Dummies Questions & Answers

user creation problem

hello, Actually I want to create a user for our brower based custom application for the mail access from our mailserver(linux). I create user dummy and I granted all the privileages to dummy user and made dummy equivelent to root and if I tried to create a another user logging as dummy ... (1 Reply)
Discussion started by: jarkvarma
1 Replies
Login or Register to Ask a Question