Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Adriano Prado <prado@gmx.net>
Subject: Re: add +200 users and set the password automatically
Date: 2000/12/04	[thread overview]
Message-ID: <90ggc9$4mb$1@nnrp1.deja.com> (raw)
In-Reply-To: 3A2BB32E.9E8F2159@manor.ch

You could use the Expect to do such task.

A simple Expect script would be:
_______________________________
#!/usr/local/bin/expect --

set user [lindex $argv 0]
set key  [lindex $argv 1]

spawn csh
expect %
send "passwd $user\r";
expect "New password:"
send "$key\r"
expect "Retype new password:"
send "$key\r"
expect %
--------------------------------

where you call your script like this: script_name <user_name> <password>



In article <3A2BB32E.9E8F2159@manor.ch>,
  Norbert Gnipp <norbert.gnipp@manor.ch> wrote:
> Hi there,
>
> We are planning to add up to 200 users on out Tru64 V5.0a Server.
> To add an user account is not a problem, but to set up the password.
>
> So we are looking for help to set the password automatically.
>
> Normally the unix password program want a user action to set the
> password, but in our case we want that we can use the password
> program with a parameter or a variable to set the password without
> an user action.
>
> Regards
> N. Gnipp
>
>

--
Adriano Prado
_______________________
prado@gmx.net


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



  reply	other threads:[~2000-12-04  5:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-04  5:00 add +200 users and set the password automatically Norbert Gnipp
2000-12-04  5:00 ` Adriano Prado [this message]
2001-04-28 17:41 ` system PRIVILEGED account
2001-05-02 12:58   ` Chuck
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox