Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a way to add a user to NIS with using adduser?

Status
Not open for further replies.

eli101

IS-IT--Management
Feb 1, 2001
54
0
0
US
Hi All,

I trying to add users with a script using the adduser commend, but the problem is that the adduser only adds users to /etc/passwd /etc/shadw etc., but my NIS tables are in a different place
Also if some knows I different way of doing this I would rely appreciate

Any help is appreciate
Eli
 
Hello

From the command line there is no other way of doing it. Unless you actually edit the tables in your NIS directory. There are a few different tools where you can edit files that are not in /etc. One of those tools is webmin. There you configure the location of your NIS tables.

Good Luck


Micha Micha Grunberg
Unix Sys-Admin
 
You can use the nistbladm and nisaddcred commands.

Check Sunsovle.sun.com for the specifics. But, basically you will do the following:

nistbladm -a name=newuser passwd="some known encrypted password" uid=999 gid=10 gcos="New User" home=/export/home/newuser shell=/bin/sh passwd.org_dir

nisaddcred -p 999 -P newuser.domain.dev. local
nisaddcred -p unix.999@domainname.dev -P newuser.domain.dev. des

The trailing dots are important where you see them.
 
dose this nisaddcred,nistbladm work on NIS (becuse I use only NIS not NIS+)
 
nisaddcred is for NIS+.
The easiest way is to edit the NIS files (shadow , passwd , group, auto.home, etc ...) and then do a ypmake. Too bad I.T. is not cash business

Luc Foata
Unix sysadmin, Oracle DBA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top