Visit Our UNIX and Linux User Community


useradd


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers useradd
# 1  
Old 05-29-2002
useradd

I work on some hp ux 11.00 Servers. i have to add an user. i use the useradd command like follows: useradd -u 72022 -g 71095 -c " comment " -d /PACKAGE_NAME/home/username -s /usr/bin/sh username

The command returns with error 3. The manpage means value number 3: Invalid argument supplied to an option.

So i dont understand what this means. The Username includes nine characters, maybe this is the failure?

thx for your indulgence.
# 2  
Old 05-29-2002
According to the manpage on my sco openserver 5, the limit is 8 characters.
# 3  
Old 05-29-2002
Why aren't you using SAM to add new users? -mk
# 4  
Old 05-29-2002
using sam

i cant use sam, because sam like to create a home directory. these machine is a member of a five node cluster. so if i like to use sam, it won`t work. also is sco unix not familiar in this problem with the user name. i cant see any restrictions in the manpage... but sam also don`t allows to use more than 8 charachters for the user name, so i think this is the problem!

many thx!
# 5  
Old 05-29-2002
patch available

There is a patch available for 11.x. It appears that this was disabled with 11.x versions.

See this link to the www.itrc.hp.com site.

http://forums.itrc.hp.com/cm/Questio...9cd0f9,00.html

BTW, for HPUX specific questions, they have a search engine database that is rather good.

Smilie
# 6  
Old 05-29-2002
Smilie useradd -u 72022 -g 71095 -c " comment " -d /PACKAGE_NAME/home/username -s /usr/bin/sh username

works fine in solaris!!.
raju
raju
# 7  
Old 05-30-2002
raju,

Yes it does too on 10.x OS in HPUX as well, but for 11.x unless you have a certain patch that allows greater that 8 chars for a username. Even though it is ignored, it can be done.



Smilie
 

Previous Thread | Next Thread
Test Your Knowledge in Computers #647
Difficulty: Medium
Window Maker is a free and open-source window manager for the X Window System designed to emulate NeXTSTEP's GUI.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Useradd with ansible

Hello, I need ansible playbook to create new user on remote server. Remote server blocked direct root login so I must login first application user and later I must run "useradd" command with sudo. I need playbook.yml and cli command. Best regards, (0 Replies)
Discussion started by: getrue
0 Replies

2. Solaris

useradd

I want to creat a 27 logins in solaris.Can anyone tell me how to write a script for that so that i create at a time for all 27 people. Thanks to guide me. (6 Replies)
Discussion started by: kkalyan
6 Replies

3. Solaris

useradd

if useradd command is deleted in solaris how do we add user (3 Replies)
Discussion started by: vivek_ng
3 Replies

4. BSD

useradd in linux

hi.. i want to know when we add a new user by useradd command in linux "ram" in the system then bydefault " ram " name directory will create inside /home/ram . why..?? i want to know behind this logic . please help me. (1 Reply)
Discussion started by: rinkugarg
1 Replies

5. Shell Programming and Scripting

Help with useradd script

Ok Im trying too make this shell script create users from my text file, I also want to type in a password for the new users. So thay can make a uniq one themself after first logon. #!/bin/sh # Sebastian schmidt clear echo "*************************************************************"... (3 Replies)
Discussion started by: chipmunken
3 Replies

6. Solaris

useradd problem

O/S: Solaris 9 Architecture: SPARC The man page for useradd states, "The new login remains locked until the passwd(1) command is executed." This is a problem for me when accessing remotely via SSH and creating a new account from the console with useradd. As soon as I try to login into the... (3 Replies)
Discussion started by: tuxsun1
3 Replies

7. UNIX for Advanced & Expert Users

useradd?

Hi Experts, when using useradd command, what are the necessary options/arguments to be included? Please advice. (4 Replies)
Discussion started by: etcpasswd
4 Replies

8. Shell Programming and Scripting

useradd

Gurus, I need to add a user to all the machines. I need a script to do this. I did one but it does not allow me to su to root within a ssh session i open. It exists saying su: Sorry. Please let me know how i can do it. I do not have the freedom of using sudo either. Regards (4 Replies)
Discussion started by: earlysame55
4 Replies

9. Solaris

useradd

Hi, I need to add a new user who will only be able to access one single folder on my Solaris 9 system. Can this be achieved by using just useradd or do i need to fiddle with auth_attr table? TIA, Selma (4 Replies)
Discussion started by: Selma
4 Replies

10. UNIX for Advanced & Expert Users

useradd

Hi. due to some needs i gave a user the premission to use useradd command with sudo. i want to know if there is a way to let him set the initial password, without giving him the premission to use passwd command as root (sudo). maybe a way to set a default password for all the new users that... (2 Replies)
Discussion started by: dorilevy
2 Replies

Featured Tech Videos