Operating System - HP-UX
1753946 Members
8111 Online
108811 Solutions
New Discussion юеВ

Re: Create multiple user account with default users group

 
SOLVED
Go to solution
John Ferro
Regular Advisor

Create multiple user account with default users group

Hello

I'm running HP-UX 11iv2, I would like to create multiple user accounts with one shot... defaults are:

User group: users
Password: xxxxx
shell: /usr/bin/sh

is there any command or scrip i can use it?

Pls. your quick response will be appreciated.
Regards,
7 REPLIES 7
Johnson Punniyalingam
Honored Contributor

Re: Create multiple user account with default users group

>>>is there any command or scrip i can use it?

Yes, useradd (man useradd command)

>>>or scrip i can use it?

You can try below script from below mentioned thread

http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1270465141996+28353475&threadId=1221111
Problems are common to all, but attitude makes the difference
Dennis Handly
Acclaimed Contributor

Re: Create multiple user account with default users group

You can use useradd.sam with a script to create multiple users with passwords. See this thread:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1358395
Michael Steele_2
Honored Contributor

Re: Create multiple user account with default users group

Funny, I have yet to find a script that will run the passwd command.
Support Fatherhood - Stop Family Law
Tim Nelson
Honored Contributor

Re: Create multiple user account with default users group

other than useradd.sam

and you are using Trusted Passwords
and if you do not need to set the pass to anything specific
and you do not care about userids

then the below would work..(more specifics should get you more details)

cat user.list|while read list
do
useradd -m $list
modprpw -x $list
done

(where user.list is a file with valid user anames, one per line)
Doug O'Leary
Honored Contributor

Re: Create multiple user account with default users group

>>Funny, I have yet to find a script that will run the passwd command.

and expect

and perl using the Expect module...

Search these forums; the question's been asked/answered multiple times.

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
Doug O'Leary
Honored Contributor
Solution

Re: Create multiple user account with default users group

Hey;

Having reread that, it sounds snarky; wasn't meant to be - humble apologies.

Searching the forums is still a valid point, though: The first three links of 50 are as follows:

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=913052

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1392985

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1249875

Doug

------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
John Ferro
Regular Advisor

Re: Create multiple user account with default users group

Thanks to all of you for your gentle response.

My problem solved....