I would first verify that you can do what you need to do with one individual directory from the shell. i.e. make sure you can chown, chgrp, and chmod -- what ever other commands you are needing to do.

What kind of system is this anyway?  That would help me a bit.

I suppose, there is a chance, that the authentication used by perl is not the same as what the command based chown, etc commands use. I assume perl calls the system call directly. On AIX, there are layers of libraries above the system call to set up the environment and other stuff to authenticate with.

Hope this helps...

On Aug 20, 2008, at 2:10 PM, Jyotishmaan Ray wrote:



All the users have been created through LIDF files format being imported to the central LDAP server in the setup. The hopme directories are being created for the students to work on their asignements etc.

The why the ownsership are not shown or changed by the commnds given in the script ?

Whats wrong, do let me know ?

Any pointers ??




--- On Wed, 8/20/08, Perry Smith <[EMAIL PROTECTED]> wrote:
From: Perry Smith <[EMAIL PROTECTED]>
Subject: Re: What is wrong with this script ??
To: "Mr. Shawn H. Corey" <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], beginners@perl.org
Date: Wednesday, August 20, 2008, 6:00 PM

On Aug 20, 2008, at 7:20 AM, Mr. Shawn H. Corey wrote:

> On Wed, 2008-08-20 at 05:16 -0700, Jyotishmaan Ray wrote:
>> Dear All,
>>
>> I have a input file containing all the rolnos of 400 studenst. I
>> have written a small perl script to create their home directories
>> in the cluster server.
>>
>> everything worked fine except for the reason that, it shows up
>> error message indicating that the following messages for example:
>>
>> when my input file rr.txt contains the following roll nos.:-
>>
>>
>> s08-1-5-095
>> s08-1-5-096
>> s08-1-5-097
>>
>> the error messages displayed are :-
>>
>>
 [EMAIL PROTECTED] perl]# perl h20.pl
>> chgrp: invalid group `s08-1-5-095'
>> chgrp: invalid group `s08-1-5-096'
>> chgrp: invalid group `s08-1-5-097'
>
> You have to create a group before you can change a file to it.  See
> `man
> 5 group`.

You also are going to hit the same issue when you do chown.  You have
to create a user too.  Just creating a home directory is not at all
the same.



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

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

Reply via email to