Hlp with getpwnam()

P

perlUSER

Hello,
I am wondering whether there is a perl sys function to retrieve the
account_locked flag. I tried the getpwnam() function but didn't get
much help.

`lsuser -a account_locked $user_id` returns ==> $user_id
account_locked=false/true

Any help is greately appreciated.

Regards,
Srini
 
U

usenet

perlUSER said:
I am wondering whether there is a perl sys function to retrieve the
account_locked flag. I tried the getpwnam() function but didn't get
much help.

`lsuser -a account_locked $user_id` returns ==> $user_id
account_locked=false/true

I have an 'lsuser' command on my AIX machine at work, but I don't think
this is a "standard" U*IX command. AIX/SMIT can get really, really,
really granular on user account settings (and especially when you throw
DCE into the mix). I don't have a 'lsuser' command on my SuSE 9.3 Pro
system at home (and I don't even see that this Linux distribution even
has such a thing as an account_locked flag - and I don't recall such an
user account flag on Mandrake or Fedora).

I think this is a very OS-specific concept. I doubt you will find a
general Perl abstraction module for it, so you're stuck with shelling
out to the OS (yuck).

But I could be wrong (and the fastest way to find out you're wrong is
to say it in usenet).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,023
Latest member
websitedesig25

Latest Threads

Top