Hi,
I'm interested in writing a perl script that will help me create user accounts on our system. I'm using Solaris 7 on a sparc Ultra which is the NIS master. I don't use the "admintool" because frankly it is insufficient. Currently when I create users I have to go to my passwd, shadow and auto_home files located in /var/yp/maps and edit them individually adding the username, group, gcos, homedir etc.. in the passwd file, then editing the shadow file adding the username followed by 8 colons, then editing auto_home adding the username followed by tab and then hostname:/home/directory/username. When the editing is complete I run /var/yp/make. This is very tedious and time consuming when I have 15 -20 users to create so I want to write this perl script where I can list the users realname and then user name, host server (i.e., John Public jpublic servername) in a seperate file and have the perl script read the names from the file backup the files to be edited and add the information to those files then run /var/yp/make. But before I do this I want to know if something that does this or something similar already exists. If not, since I'm new to Perl, what would be the best way to start this project? Are there modules I should get (already got the AcctInfo-1.18 module) that would help. Any suggestions or comments would be appreciated.
Jon Zimmer
jon.zimmer@pf.net
The software required `Windows 95 or better', so I installed Linux.
I'm interested in writing a perl script that will help me create user accounts on our system. I'm using Solaris 7 on a sparc Ultra which is the NIS master. I don't use the "admintool" because frankly it is insufficient. Currently when I create users I have to go to my passwd, shadow and auto_home files located in /var/yp/maps and edit them individually adding the username, group, gcos, homedir etc.. in the passwd file, then editing the shadow file adding the username followed by 8 colons, then editing auto_home adding the username followed by tab and then hostname:/home/directory/username. When the editing is complete I run /var/yp/make. This is very tedious and time consuming when I have 15 -20 users to create so I want to write this perl script where I can list the users realname and then user name, host server (i.e., John Public jpublic servername) in a seperate file and have the perl script read the names from the file backup the files to be edited and add the information to those files then run /var/yp/make. But before I do this I want to know if something that does this or something similar already exists. If not, since I'm new to Perl, what would be the best way to start this project? Are there modules I should get (already got the AcctInfo-1.18 module) that would help. Any suggestions or comments would be appreciated.
Jon Zimmer
jon.zimmer@pf.net
The software required `Windows 95 or better', so I installed Linux.