On Thu, 12 Mar 2009, kemas henry wrote: > > For((i=1;i<50;i++)) do > urutan=${1}`printf "%03d" $i` > useradd $urutan -m -k /etc/skell > echo $urut > /tmp/urut > passwd --stdin $urutan < /tmp/urut > done
bisa juga pake command sederhana: /usr/sbin/newusers sedikit petunjuk: # /usr/sbin/newusers < daftar-newuser.txt atau # ./script-bikin-daftar-user.sh | /usr/sbin/newusers NEWUSERS(8) NEWUSERS(8) NAME newusers - update and create new users in batch SYNOPSIS newusers [new_users] DESCRIPTION newusers reads a file of user name and clear-text password pairs and uses this information to update a group of existing users or to create new users. Each line is in the same format as the standard password file (see passwd(5)) with the following exceptions: pw_passwd This field will be encrypted and used as the new value of the encrypted password. pw_age This field will be ignored for shadow passwords if the user already exists. pw_gid This field may be the name of an existing group, in which case the named user will be added as a member. If a non-existent [...] salam -- |===[ Yudhi Kusnanto ]=============| |===[ STMIK Akakom ]===============| |===[ http://www.akakom.ac.id/ ]===| -- FAQ milis di http://wiki.linux.or.id/FAQ_milis_tanya-jawab Unsubscribe: kirim email ke tanya-jawab-unsubscr...@linux.or.id Arsip dan info milis selengkapnya di http://linux.or.id/milis