User Automation

User Automation

Post by griff.. » Fri, 23 Jun 2000 04:00:00



Does anyone know if there is a way to automate the addition of user onto
a Solaris 8 machine?  I would like to use perl and useradd, but that
won't work for the password, which needs to be run interactivly with the
passwd command.  Anyone gone through this and can provide some pointers?

Griffin Caprio

Sent via Deja.com http://www.deja.com/
Before you buy.

 
 
 

User Automation

Post by Andrei Ivan » Fri, 23 Jun 2000 04:00:00



> Does anyone know if there is a way to automate the addition of user onto
> a Solaris 8 machine?  I would like to use perl and useradd, but that
> won't work for the password, which needs to be run interactivly with the
> passwd command.  Anyone gone through this and can provide some pointers?

You can use Expect (Tcl-based scripting language), but under Solaris [78]
/usr/lib/makekey may be useful as well. Once I wrote about addition of
encrypted passwords to /etc/shadow from shell script:

% In bourne shell you can use smth like the following to generate new 'shadow' file:
%
%  e_pass=`printf "%-8s${salt}\n" "$password" | tr ' ' '\000' | /usr/lib/makekey`
%  echo "${username}:${e_pass}:${day}::::::" >> shadow.new
%
% where variables named 'username', 'password', 'salt', and 'day' contain
% username, clear text password, 2-character salt, and day of unix epoch
% respectively (there are no man page for the 'makekey' program :-().

Just checked: this works under Solaris 8, but there are no man pages for
makekey (still :-().

--
andrei

 
 
 

1. Add user account automation

I'm trying to automate adding users on our systems, we have Sun, Solaris
and other UNIX like systems. The other boxes dont support NIS. They have
a simple /etc/passwd file. Now I've gotta somehow get the password filed
from the /etc/shadow file and the rest from /etc/passwd and ftp
(cron job) to the other UNIXlike boxes.
I've not been able to come up with that script.
I'd appreciate if anybody could help me out if they have already written
such a script, thank you,
John F. Carter

2. two sets of make file directories?

3. Help please with FTP automation

4. UNIX Developer for Datawarehousing in Alameda -- Contract

5. creating a automation script

6. more info on my dj400 print gamma problem

7. Mail automation

8. is IPsec supported?

9. Unix to NT ftp automation script

10. Secure automation?

11. OpenBSD & X10 automation: serial port troubleshooting,pccom,/dev/cua,cm11a)

12. Solaris Automation experts ! needed in Sunny Scottsdale AZ !

13. Complete automation of fsck possible?