1830898 Members
3069 Online
110017 Solutions
New Discussion

Lock file

 
SOLVED
Go to solution
juno2
Super Advisor

Lock file

I am not understand the below difference of UX and linux system,

I tried the UX allow two users change the password at the same time by the command â passwdâ , but the linux canâ t , because linux donâ t allow two users concurrent update the file /etc/passwd , it will lock the passwd file ( check the file /etc/.pwd.lock ) when one user is updating the password . However , I do think two users change password at the same time is very common situtation , can suggest is it possible to disable the lock file function ? so that the users can change the password at the same time ? I know this is linux side problem , but UX concept whether can apply to the linux block ?
7 REPLIES 7
Rajeev  Shukla
Honored Contributor

Re: Lock file

Hi Juno2,

I am sorry but you post a lot of questions but dont bother to look back at people who take time to give solutions.
You'r last 2 posts are still unasigned with points.
I hope you understand...

Cheers
Rajeev
juno2
Super Advisor

Re: Lock file

Yes , thx for reminding me , I will assign the pt ASAP.
T G Manikandan
Honored Contributor
Solution

Re: Lock file

you are right! When a processes accesses the password file /etc/.pwd.lock file is created, so that other processes do not acccess the file.

you can do a

#fuser /etc/.pwd.lock
identify the process and then terminate them.

I don't think you can disable this!
juno2
Super Advisor

Re: Lock file

HI TG,

I am strange why UX block can do that ,
I tried your method
# fuser /etc/.pwd.lock , but no output , can suggust what can i do ? thx.
juno2
Super Advisor

Re: Lock file

Thx reply, can suggest how can I allow all users to change password at the same time ? thx.
Thierry Poels_1
Honored Contributor

Re: Lock file

Hi,

the password file is locked during update for consistency reasons. If two users would simultaneously update the password file, the first update might be overwritten by the second user.

On the other hand: what is the chance that two or more users change their passwords at the same moment?

regards,
Thierry Poels.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
T G Manikandan
Honored Contributor

Re: Lock file

Is there any file like /etc/ptmp

if present,rename the file and try again