> > Actually i'm not very quick in programming and not > familiar with perl. I'd rather get a ready made script > (if there's any available). :)
Hi, Here a little script that might help with a bit of adaption. This script is a bit hacky but you should get something of it -- Main script -- #!/bin/bash if [ -z "$1" ] ; then echo Usage $0 username ; exit;fi if [ -e "~/$1 ] ; then echo $1 exists. Exitiing; exit ; fi pass=`otp | awk '{ print $2 }' | head -1` echo Using passwd $pass useradd -d /home/$1 -m $1 password_set $1 $pass password_set is an expect script #!/usr/bin/expect # username is passed as 1st arg, password as 2nd spawn passwd [lindex $argv 0] set password [lindex $argv 1] expect "password:" send "$password\r" expect "password:" send "$password\r" expect eof HTH Rus -- w: http://www.jvds.com | Linux + FreeBSD Servers from $15/mo e: [EMAIL PROTECTED] | Dedicated Servers from $119/mo t: +44 7919 373537 | email: [EMAIL PROTECTED] t: 1-888-327-6330 | email: [EMAIL PROTECTED] -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED] https://www.redhat.com/mailman/listinfo/redhat-list