Each entry in the shadow file has the form (use man -s4 shadow for man page):
The fields are defined as follows:
username The user's login name (UID).
password A 13-character encrypted password for the user,
a lock string to indicate that the login is not
accessible, or no string, which shows that there
is no password for the login.
lastchg The number of days between January 1, 1970, and
the date that the password was last modified.
min The minimum number of days required between
password changes.
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.
expire An absolute date specifying when the login may
no longer be used.
flag Reserved for future use, set to zero. Currently
not used.
For the /etc/passwd file - see man -s4 passwd
password is an empty field. The encrypted password
for the user is in the corresponding entry
in the /etc/shadow file. pwconv(1M) relies
on a special value of 'x' in the password
field of /etc/passwd. If this value of 'x'
exists in the password field of
/etc/passwd, this indicates that the pass-
word for the user is already in /etc/shadow
and should not be modified.
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)
what does the last column in /etc/shadow file indicate??
i read man page,it tells its FLAG..but i am not able to understand exactly why its there :confused:
thanks in advance,
shekhar (4 Replies)
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)
I guess the earlier problem I had with changing user passwords and creating new users is related to the shadow file. Anytime I change something to /etc/passwd or shadow I get locked out.
HOW DO I REGENERATE THIS FILE. (1 Reply)
Hey guys..
i need to be able to append 'LK' to a password field in the shadow file
I cannot use commands such as usermod chsh i need to directly be able to manupilate the files through a menu driven interface. So in other words write to the shadow file
How could i do this?
so far... (1 Reply)
Hi guys,
I have a doubt on shadow file ... In the Unix servers in which I am working, I cud see that the shadow file has only one permission set .. tht is read permission for only root user ... (-r--------) ....
So my basic doubt here is that how this file is being written then ... only... (4 Replies)
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)