Operating System - HP-UX
1827793 Members
2320 Online
109969 Solutions
New Discussion

Re: Adding User Accounts to NIS without using SAM

 
SOLVED
Go to solution
Angie_1
Regular Advisor

Adding User Accounts to NIS without using SAM

I set up NIS on a 11.x system a long time ago. And since then been using SAM to setup my NIS user accounts which then pushes the maps out.

I would like to know what exact commands are being used to do this task. A script is going to be written to do this process instead of going into SAM.

For example, a user is added to the passwd.nis file, the maps then need to be generated (what command line & switches to do this), and then pushed out (again need command line syntax to push to secondary server).

Would appreciate a quick reply.

Angie
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Adding User Accounts to NIS without using SAM

I can not completely fulfill your request.

The command you wish to use is useradd

man useradd shows several NIS options which I can not test.

After the user is created and you are happy with the nis accounts, yppush can push the commands out.

I can not be more specific, because we don't use NIS here.

You wanted a quick answer, and this one will at least get you started.

SEP
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
Angie_1
Regular Advisor

Re: Adding User Accounts to NIS without using SAM

Hello,

Well the user can be added with Useradd indeed... its the command line I need of pushing the maps out, etc.

Anyone using NIS out there? Ha!

Angie
A. Clay Stephenson
Acclaimed Contributor

Re: Adding User Accounts to NIS without using SAM

Adding users to a NIS domain always requires custom scripting and its almost always dome on the NIS master although the user's home directory could be anywhere. The useradd command gets you started; you then have to issue the passwd command (or build a command to generate the passwd hash); you need to modify the automount maps if the user's home directory is automounted or create the user's home directory via remsh's on all the client machines he might use otherwise. You final step is "cd /var/yp; make" -- that will update the NIS maps and push them out to the clients.
If it ain't broke, I can fix that.
Simeon Harwood
Regular Advisor
Solution

Re: Adding User Accounts to NIS without using SAM

Hi Angie,
If you edit the passwd.nis file and add the user in there, then you need to push the nis map out: -
/var/yp/make passwd

If you want to change the users password in the NIS domain then use: -

yppasswd
you might need to run
/var/yp/make passwd
again to push it out.
Slave NIS servers should update them selves automatically periodicaly, or you can run this from the slave.
/var/yp/ypxfr passwd.byname

Sime.
You never had this problem with a pencil and paper!
Angie_1
Regular Advisor

Re: Adding User Accounts to NIS without using SAM

Thank you so very much! The links and information were great!

Angie