passwd file lock?

Bob Ware bware at csm9a.UUCP
Wed Aug 1 06:29:15 AEST 1990


I am in the process of setting up an RS/6000 3.1 for general use, and
need to get a program running to automate addition of new users
(without using smit).  I have such a program working under BSD4.3, but
have encountered a problem porting it to the RS/6000.

Most of it can be done by doing a system call to the "mkuser" and
"chuser" commands but then I need to give the new account a password to
get them started and in order to do so I need to modify the /etc/passwd
and /etc/security/passwd files.  The problem is that I have no idea how
to lock the files while they are being modified.

Can anyone tell me how the "smit", "chuser", "pwdadm" and "passwd"
commands lock the passwd files?  Or perhaps someone can suggest an
alternate approach.

Thanks.

Bob Ware, Colorado School of Mines, Golden, Co 80401, USA
(303) 273-3987
bware at mines.colorado.edu bware at mines.bitnet isis!csm9a!bware



More information about the Comp.unix.aix mailing list