Operating System - HP-UX
1830899 Members
1902 Online
110017 Solutions
New Discussion

A script to incorporate useradd, userdel and usermod

 
SOLVED
Go to solution
Donald C Nelson
Frequent Advisor

A script to incorporate useradd, userdel and usermod

Does anyone have a script that incorportates useradd,usermodd and userdel into one interactive script that can be used accross servers. I know that NIS does this but it is too cumbersome.
3 REPLIES 3
Steven E. Protter
Exalted Contributor
Solution

Re: A script to incorporate useradd, userdel and usermod

LDAP does this is well.

Install openldap
11 v1
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1111

11i v2
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXIEXP1123

If forced to script it, here is how I'd do it.

Set up Secure Shell on all machines.
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=T1471AA
Exchange Public keys

Then I'd have a little script that contains a server list and will do the add and delete the users across the machines.

I don't have time to write the whole thing for you right now.

SEP
http://www.isnamerica.com/contactsep.shtml

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Pete Randall
Outstanding Contributor

Re: A script to incorporate useradd, userdel and usermod

Donald,

I'm not quite sure how a script like this would work across servers. I do all my password work on the server that needs changing and then rcp the passwd file to all my other servers. Works for me, anyway.

You might want to browse through Bill McNamara's script collection(s):

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=51050


Pete

Pete
Donald C Nelson
Frequent Advisor

Re: A script to incorporate useradd, userdel and usermod

I will go with Steve's suggestion.