On Aug 19, 2008, at 1:48 PM, Jyotishmaan Ray wrote:


Dear All,

I am a new bie in perl. I have to create the home directories of 424 students in a server machine.

The path of the home directory would be :-

/mnt/btech/formatted-rollno.

where formatted-rollno ="s08-1-5-097"


And the input file contains all the rollnos of 424 students.



A sample student file of five students is as given below (in the format of uid, MD5 password) as below:-



s08-1-5-093
s08-1-5-094
s08-1-5-095
s08-1-5-096
s08-1-5-097

For example, the home directories,
for the rollno, s08-1-5-097, would be this->


 /mnt/btech/s08-1-5-097

All the student should
have read/write and execute permissions in their home directories.


Can any one provide the perl script  for doing this ?


If this is a legitimate question and not a student asking us to write his homework for him, I would not use simple perl script to create user accounts. There is so much more to do like set up the password file, etc. There is usually some sort of create user script or command on a system. It might be logical to drive that command via perl to do what you want.

Perry
Ease Software, Inc. ( http://www.easesoftware.com )

Low cost SATA Disk Systems for IBMs p5, pSeries, and RS/6000 AIX systems


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to