Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

check if account is locked 1

Status
Not open for further replies.

philipose

Programmer
Dec 24, 2003
137
US
hi,
If I am a non root user and cannot read any files in /etc/security. Is it possible for me to see if a user id is locked or not ? The lsuser command does not show the account_locked attribute. The OS I am using is AIX 5.3

Regards
philipose
 
I don't think you can philipose! This will violate the reason behind maintaining those files with root access only! unless you change the those files permissions which i don't advice you to do! or use sudo!

The way you do it is to use root is this:

lsuser -a account_locked unsuccessful_login_count {ALL|user_name}


Regards,
Khalid
 
It is as simple as the following....from any user :eek:)

lsuser -f <user_id> | grep locked

Regards,
Sraj
 
Khalid,
Thanks for your help. But this is what I get when I do
lsuser -a account_locked $USER

3004-697 Attribute "account_locked" is not valid.

A user with root access confirmed that he could see this attribute when running lsuser.

I think I wont pursue this further.
Thanks again
philipose
 
Hi philipose....

Have you got the reqult with my above suggestion ? If you need status of all the attributes you may just use " lsuser -f <userid> "

Regards,
Sraj

 
Sraj,

The attributes I can see when I do a lsuser or a lsuser -f are

id, pgrp, groups, home, shell, gecos, roles, registry

Maybe at an SA level they could change things.
philipose

 
Hi philipose,
You are right, its required SA rights at least, but not the super user.
Without SA, I am also with Khalid. It may not be possible.

Regards- Sraj
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top