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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix password expiry, locked account info and secondary group 1

Status
Not open for further replies.

philipose

Programmer
Dec 24, 2003
137
US
Unis gurus,
There were 3 questions that were bothering me.
Can I find the below on an AIX 5.3 server

i) When will my Unix password expire once I have logged in ?
ii) Can user A (root or non root) know whether user B's account is locked or not, if user A is already logged in ?
iii) Is there a way to say all users with primary group X will have a secondary group membership in group Y?

Thanks a lot
philipose
 
1.

lsuser someuser

To make things easier one entry per line:

lsuser someuser | tr " " "\n"

For system defaults use:

lsuser default

To see when user last updated their password (in Unix time - seconds elapsed since Jan 1 1970), issue (as root or member of the security group):

pwdadm -q someuser

The information of the password ageing of an user is stored in /etc/security/user file in AIX and the format in which the attributes are stored are in text format please look into this link for more details :


2.

pg /etc/passwd

If the user ID does not have a password, then the password field will have an * (asterisk).

The encrypted passwords are stored in the /etc/security/passwd file. The following example contains the last four entries in the /etc/security/passwd file based on the entries from the /etc/passwd file shown previously.
guest:
password = *

nobody:
password = *

lpd:
password = *

paul:
password = eacVScDKri4s6
lastupdate = 1026394230
flags = ADMCHG
The user ID jdoe does not have an entry in the /etc/security/passwd file because it does not have a password set in the /etc/passwd file.

The consistency of the /etc/passwd file can be checked using the pwdck command. The pwdck command verifies the correctness of the password information in the user database files by checking the definitions for all of the users or for specified users.

3.

You can script this or edit /etc/security/groups

see




Mike

"Whenever I dwell for any length of time on my own shortcomings, they gradually begin to seem mild, harmless, rather engaging little things, not at all like the staring defects in other people's characters."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top