Operating System - HP-UX
1837962 Members
3335 Online
110124 Solutions
New Discussion

Re: NIS Private password file - adding users from command line

 
Dean Johnson_10
Advisor

NIS Private password file - adding users from command line

Hi

I wonder if anyone can help. I am building an environment on HPUX 11i v1 to migrate my current environment to (from HPUX 11.0)
My current environment uses NIS and I need to implement this in the new environment (I have looked at LDAP but cannot migrate to it just yet). I came across a document about creating a seperate private password file for NIS users which may resolve some issues we have in our current environment where we have to have local entries as well as NIS entries for some users. I have configured the private passwd file but when I come to add a new user using useradd on the master server, instead of updating the NIS private password file (/etc/passwd.yp) it updates the local /etc/passwd file.
I have looked for some flags on passwd but find none that would cause the update to be performed on the "private" passwd file. If I use sam it works because you go into a seperate option for NIS users but samlog does not show the command being used to add the user.
I need the command line because we use a seperate GUI tool for our helpdesk to add users.

Any ideas would be greatly appreciated.

Dean
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: NIS Private password file - adding users from command line

Shalom Dean,

I'd take a look at that sam log again.

If it add's a user, there is a command issued to do it. It may be a funky sam command, or it may be a normal command, but if you look, you will see something in there.

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
Dean Johnson_10
Advisor

Re: NIS Private password file - adding users from command line

Hi Steven

Thanks for the quick response.
I have checked and double checked and I still can't find the command for either adding or modifying the account to the NIS private passwd file from the samlog. Here are a couple of extracts ......

User add .......

Performing task "Validate Login Shell".
@!@8@1139843401@0
Exiting Task Manager with task UG_VALIDATE_STARTUP_PROG.
@!@8@1139843401@0
Entering Task Manager with task UG_IS_UID_IN_USE.
@!@2@1139843401@0
Determining if User ID "4900" is in use.
@!@8@1139843401@0
Exiting Task Manager with task UG_IS_UID_IN_USE.
@!@1@1139843407@0
Adding user deantst.
@!@8@1139843407@0
Entering Task Manager with task UG_ADD_USER.
@!@2@1139843407@0
Performing task "Add User".
@!@8@1139843407@0
Entering Task Manager with task ug_usradd.
@!@8@1139843408@0
Exiting Task Manager with task ug_usradd.
@!@8@1139843408@0
Exiting Task Manager with task UG_ADD_USER.
@!@1@1139843408@0
Successfully added user deantst.
@!@8@1139843409@0
Entering Task Manager with task UG_GET_OLE_USERS.
@!@2@1139843409@0
Performing task "Get Users".
@!@8@1139843409@0
Exiting Task Manager with task UG_GET_OLE_USERS.
@!@129@1139843410@0
Mon Feb 13 15:10:10 2006 Exiting SAM area "Accounts for Users and Groups (tar
serv)".
@!@8@1139843411@0
Entering Task Manager with task ug_ypmake_nis_maps.
@!@2@1139843411@0
Performing task "Rebuild NIS Maps".
@!@2@1139843411@0
Executing the following command:\C/var/yp/ypmake PWFILE=/etc/passwd.yp&\C
@!@2@1139843411@0
Command completed with exit status 0.


Modifying users GECOS .........

@!@1@1139843590@0
Modifying user deantst.
@!@8@1139843590@0
Entering Task Manager with task UG_MODIFY_USER.
@!@2@1139843590@0
Performing task "Modify User".
@!@8@1139843590@0
Entering Task Manager with task ug_usrmod.
@!@8@1139843591@0
Exiting Task Manager with task ug_usrmod.
@!@8@1139843591@0
Exiting Task Manager with task UG_MODIFY_USER.
@!@1@1139843591@0
Successfully modified user deantst.
@!@8@1139843591@0
Entering Task Manager with task UG_GET_OLE_USERS.


But a deletion from the NIS private password file shows as .........

Performing task "Remove User".
@!@8@1139841449@0
Entering Task Manager with task ug_userdel.
@!@2@1139841449@0
Performing task "Remove User Account".
@!@2@1139841449@0
Executing the following command:\C/usr/sam/lbin/userdel.sam -S /etc/passwd.yp -P -F deantst\C
@!@2@1139841449@0
Command completed with exit status 0.
@!@8@1139841449@0
Exiting Task Manager with task ug_userdel.
@!@8@1139841449@0
Exiting Task Manager with task UG_REMOVE_USER.
@!@1@1139841449@0
Successfully removed user deantst.
@!@1@1139841449@0
Removing user deantst from personal security device.
@!@8@1139841449@0
Entering Task Manager with task UG_REMOVE_USER_SC.
@!@2@1139841449@0
Remove User from SmartCard
@!@8@1139841449@0
Exiting Task Manager with task UG_REMOVE_USER_SC.
@!@1@1139841449@0
Removing user deantst from personal security device was skipped.
@!@129@1139841452@0
Mon Feb 13 14:37:32 2006 Exiting SAM area "Accounts for Users and Groups (tarserv)".