Operating System - HP-UX
1833198 Members
2608 Online
110051 Solutions
New Discussion

Adding User IDs in NIS environment

 
John Hietala_1
Occasional Contributor

Adding User IDs in NIS environment

I'm looking for a command or script similar to useradd, that would modify the password file in /var/yp/src.

1 REPLY 1
Shannon Petry
Honored Contributor

Re: Adding User IDs in NIS environment

Your gonna have to do this yourself. While NIS supports passwords for users in non-default locations, and password -F /var/yp/src/passwd works, the useradd commands dont support external password files.
I think that SAM can be configured for a different password file for NIS users, but not sure about that.
I guess the thought is that if your smart enough to make the system work with a non-default passwd file, then your smart enough to create a user, then tail -1 /etc/passwd >>/var/yp/src/passwd
then delete the entry in /etc/passwd.

If you can code C, then there are lots of useradd program sources floating around. search the forums and I am sure you'll get at least 3-4. Since these mostly use the system calls for pwtmp, you may have lots of mods to do.

Regards,
Shannon
Microsoft. When do you want a virus today?