From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,2451cbea516681d9 X-Google-Attributes: gidfa528,public From: Adriano Prado Subject: Re: add +200 users and set the password automatically Date: 2000/12/04 Message-ID: <90ggc9$4mb$1@nnrp1.deja.com>#1/1 X-Deja-AN: 700990063 References: <3A2BB32E.9E8F2159@manor.ch> X-Http-Proxy: 1.0 spo-pg-intra:8080 (Squid/2.3.STABLE1), 1.0 x51.deja.com:80 (Squid/1.1.22) for client 172.17.200.95, 200.212.96.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Dec 04 16:22:43 2000 GMT X-MyDeja-Info: XMYDJUIDapcarvalho Newsgroups: comp.unix.tru64 X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 98) 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 In article <3A2BB32E.9E8F2159@manor.ch>, Norbert Gnipp 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.