Operating System - HP-UX
1833742 Members
2831 Online
110063 Solutions
New Discussion

Moving a user from NIS to /etc/passwd.

 
brian_31
Super Advisor

Moving a user from NIS to /etc/passwd.

Team:

We want to move a user from NIS to the /etc/passwd file. The user has a cron job running in his id and i need to maintain the home directory. Will moving the user affect these and how do i do it? Please help and thanks in advance.

Regards

Brian.
1 REPLY 1
A. Clay Stephenson
Acclaimed Contributor

Re: Moving a user from NIS to /etc/passwd.

All you have to do is make sure that his entry in the /etc/passwd file comes before the '+' entry /etc/passwd. Add the user normally user SAM, useradd, or manually editting the passwd file -- whatever your weapon of choice though useradd is mine. Then use vipw to ensure that the new entry precedes the '+' passwd entry.

It is probably a good idea to make sure that the UID and GID match his old NIS values. If you like, you can then delete him from the NIS passwd map on the master server and do a ypmake.

As long as the old/new GID's and UID's match, cron and at will continue to operate and your changes will not affect running jobs.

If it ain't broke, I can fix that.