P
perlUSER
Hello all;
I am writing a perl program to lock the user ID if it exists in a file
that I receive on a daily basis. I could use "lsuser -a account_locked
user_ID" to see whether user_ID is locked or not. If locked then I skip
the record and go to the next record. Is there a perl function to get
this account_locked flag value something like below?
my $userPw = getpwnam($user);
my $home = $userPw -> dir;
my $uid = $userPw -> uid;
my $gecos = $userPw -> gecos;
I tried this but didn't work:
my $account_locked = $userPw -> account_locked;
The above function gives some information but not the
account_locked=true or account_locked=false.
I appreciate any help on this problem.
Thanks in advance.
Regards,
Sri.
I am writing a perl program to lock the user ID if it exists in a file
that I receive on a daily basis. I could use "lsuser -a account_locked
user_ID" to see whether user_ID is locked or not. If locked then I skip
the record and go to the next record. Is there a perl function to get
this account_locked flag value something like below?
my $userPw = getpwnam($user);
my $home = $userPw -> dir;
my $uid = $userPw -> uid;
my $gecos = $userPw -> gecos;
I tried this but didn't work:
my $account_locked = $userPw -> account_locked;
The above function gives some information but not the
account_locked=true or account_locked=false.
I appreciate any help on this problem.
Thanks in advance.
Regards,
Sri.