LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Debian - /etc/passwd, vim, vipw (https://www.linuxquestions.org/questions/linux-general-1/debian-etc-passwd-vim-vipw-861201/)

armandino 02-07-2011 11:42 AM

Debian - /etc/passwd, vim, vipw
 
I know that the vipw command, as man pages say, "edits the password file after setting the appropriate locks".

I tried opening two terminals and issuing "vipw" on both. The first time I got in the passwd file as expected, the second time I got an error message, as expected.

I then issued "vipw" in one terminal and "vim /etc/passwd" in the other. The first time I got in the passwd file as expected, the second time I... also entered the passwd file and was able to edit and also to save it!

Am I missing something or those locks are not so "appropriate"?

mavenjinx 02-07-2011 12:16 PM

Not sure but i think the Default editor is allowed to edit the file by bypassing the locks but i may be wrong

and i think in your case vi is the default editor


All times are GMT -5. The time now is 01:24 PM.