Impact of shadow file 'lastchg' parameter NULL or 0?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Impact of shadow file 'lastchg' parameter NULL or 0?
# 1  
Old 03-18-2008
Impact of shadow file 'lastchg' parameter NULL or 0?

I've encountered shadow files where the "lastchg" parameters are set to NULL and also zero (0) for some Solaris machines (one running v10, one running v8).

I was wondering what impact this has on password ageing, and therefore enforced password change.

Does the NULL mean the account has never been logged on, and therefore the parameter never set?

Does the NULL mean the account is effectively disabled?

Does the NULL mean the account's password will never age as the calculation of age cannot be performed using a NULL?

Same questions for the zero (0).

Thanks in advance.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Passwd -l or -u modifies lastchg field in /etc/shadow file

Hi, I have a Solaris 10 box where password aging is not functioning properly. Using the passwd command with the -l or -u options causes the lastchg field in the /etc/shadow file to be modified. Therefore, if a user's password is set to expire in 90 days and they are 1 day away, all they have... (4 Replies)
Discussion started by: cschar
4 Replies

2. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

3. UNIX for Dummies Questions & Answers

Shadow file help

As a part of linux hardening In shadow file all Application accounts which are not locked must contain only an asterisk “*” in the Passwd field. But how would i do it by using command? Is there any way other than modifying shadow file to accomplish this task? (3 Replies)
Discussion started by: pinga123
3 Replies

4. Solaris

delete shadow file

hi everybody i 'm beginner in solaris and by mistake i removed shadow file any one can help me to restore it from passwd file (4 Replies)
Discussion started by: maxim42
4 Replies

5. Shell Programming and Scripting

Shadow file

Hi, In shadow file smithj:Ep6mckrOLChF.:10063:0:99999:7::: 3rd Field 10063 indicates the number of days (since January 1, 1970) since the password was last changed. I want to get the result with script the date on which the password was last changed in YYYY-MM-DD format. can... (8 Replies)
Discussion started by: pinnacle
8 Replies

6. UNIX for Dummies Questions & Answers

Shadow File

I see conflicting definitions for the shadow file. For Solaris, what are the fields please? Thanks. (3 Replies)
Discussion started by: DavidS
3 Replies

7. UNIX for Advanced & Expert Users

/etc/shadow file....

Does anyone know what "!!" represents in the password field of the /etc/shadow file? :confused: (6 Replies)
Discussion started by: avcert1998
6 Replies

8. Solaris

*LK* in /etc/shadow file

my etc/shadow file showing *LK* for a particular user.. can u tell me under which circumstances a user is locked (5 Replies)
Discussion started by: vikashtulsiyan
5 Replies

9. UNIX for Advanced & Expert Users

shadow file

what does 'x' in the encrypted password field in /etc/shaodw file represent? (3 Replies)
Discussion started by: jbashir
3 Replies

10. UNIX for Dummies Questions & Answers

shadow file

Sirs, What is a shadow file,How it be usefull.For my project i have to keep the password in shawdow file also i am doing in php how can i do it. Thanks in advance, ArunKumar (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
Login or Register to Ask a Question
shadow(4)							   File Formats 							 shadow(4)

NAME
shadow - shadow password file DESCRIPTION
/etc/shadow is an access-restricted ASCII system file that stores users' encrypted passwords and related information. The shadow file can be used in conjunction with other shadow sources, including the NIS maps passwd.byname and passwd.byuid and the NIS+ table passwd. Programs use the getspnam(3C) routines to access this information. The fields for each user entry are separated by colons. Each user is separated from the next by a newline. Unlike the /etc/passwd file, /etc/shadow does not have general read permission. Each entry in the shadow file has the form: username:password:lastchg:min:max:warn:inactive:expire:flag The fields are defined as follows: username The user's login name (UID). password An encrypted password for the user generated by crypt(3C), a lock string to indicate that the login is not accessible, or no string, which shows that there is no password for the login. The lock string is defined as *LK* in the first four characters of the password field. lastchg The number of days between January 1, 1970, and the date that the password was last modified. The lastchg value is a decimal number, as interpreted by strtol(3C). min The minimum number of days required between password changes. This field must be set to 0 or above to enable password aging. max The maximum number of days the password is valid. warn The number of days before password expires that the user is warned. inactive The number of days of inactivity allowed for that user. This is counted on a per-machine basis; the information about the last login is taken from the machine's lastlog file. expire An absolute date expressed as the number of days since the Unix Epoch (January 1, 1970). When this number is reached the login can no longer be used. For example, an expire value of 13514 specifies a login expiration of January 1, 2007. flag Failed login count in low order four bits; remainder reserved for future use, set to zero. A value of -1 for min, max, or warn disables password aging. The encrypted password consists of at most CRYPT_MAXCIPHERTEXTLEN characters chosen from a 64-character alphabet (., /, 0-9, A-Z, a-z). Two additional special characters, "$" and ",", can also be used and are defined in crypt(3C). To update this file, use the passwd(1), user- add(1M), usermod(1M), or userdel(1M) commands. In order to make system administration manageable, /etc/shadow entries should appear in exactly the same order as /etc/passwd entries; this includes ``+'' and ``-'' entries if the compat source is being used (see nsswitch.conf(4)). Values for the various time-related fields are interpreted as Greenwich Mean Time. FILES
/etc/shadow shadow password file /etc/passwd password file /etc/nsswitch.conf name-service switch configuration file /var/adm/lastlog time of last login ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ SEE ALSO
login(1), passwd(1), useradd(1M), userdel(1M), usermod(1M), strtol(3C), crypt(3C), crypt_gensalt(3C), getspnam(3C), putspent(3C), nss- witch.conf(4), passwd(4), attributes(5), pam_unix_account(5), pam_unix_auth(5) NOTES
If password aging is turned on in any name service the passwd: line in the /etc/nsswitch.conf file must have a format specified in the nss- witch.conf(4) man page. If the /etc/nsswitch.conf passwd policy is not in one of the supported formats, logins will not be allowed upon password expiration, because the software does not know how to handle password updates under these conditions. See nsswitch.conf(4) for additional information. SunOS 5.11 15 Sep 2005 shadow(4)