1820069 Members
2340 Online
109608 Solutions
New Discussion юеВ

about the chage

 
juno2
Super Advisor

about the chage

sorry to repost the question again , but i really still can't fix the problem ,

I use the below command to force user to change the password ,

# chage -d0 user1
# chage -d0 user2

however , there is the below problem :
when the user1 is login and hold the screen :

login: user1
Password:
You are required to change your password immediately (root enforced)
Changing password for user1
(current) UNIX password:

if the user1 is not change the password promptly and stop at the above the screen , then when user2 login to the system , it will stop at the below screen :

login: user2
Password:
You are required to change your password immediately (root enforced)

user2 will hold at the above screen until user1 exit the change password screen , this problem will also happen other RH system , can anyone kindly help to suggest the solution ? Thank in advance.
3 REPLIES 3
juno2
Super Advisor

Re: about the chage

I am not sure why this happen , but I also found that if user1 stop at the screen , then root can't use the command chage

# chage -d0 user3
chage: can't lock password file

can I fix the problem if I can unlock the password file ? thx
Martin P.J. Zinser
Honored Contributor

Re: about the chage

The user does have a file lock on passwd. You should be able to find the process holding the lock using lsof. Afterwards an appropriate kill can take care of it.
juno2
Super Advisor

Re: about the chage

thx reply,

instead of this method , is it possible to disable the lock function when user are changing the password ? thx.