Instead of creating the home directory as part of a batch job you might
think of having the OS take care of it only when required.
Under linux you might think of updating
/etc/pam.d/system-auth and add this line:
session required pam_mkhomedir.so skel=/etc/skel/ umask=0022
The users home directory will get created on the 1st login.
-Jason
On Tue, 2008-08-19 at 09:46 -0700, 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 ?
>
>
>
>
>
>
>
>
>
--
----------------------------------------------------------------------------
Jason A. Kates ([EMAIL PROTECTED])
Fax: 208-975-1514
Phone: 212-400-1670 x2
============================================================================