Mailing List
Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Installation - Getting started with Red Hat Linux
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 8.0 - Discussion of Red Hat Linux 8.0 (Psyche)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Red Hat Linux 7.1 - Discussion of Red Hat Linux 7.1 (Seawolf)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
use of passwd.lock and passwd-

use of passwd.lock and passwd-

2004-01-28       - By Pete Nesbitt

 Back
On January 27, 2004 08:42 pm, Kirankumar Puttur wrote:
> Hi ,
>
> You are right peter on both the occasions , but peter i found a strange
> behaviour in this line ,
>
> whenever i create a user without a passwd (in RH EL 2.4) the passwd.lock
> file would appear under etc folder but once i add passwd to the user the
> passwd lock file would disappear
>
> I think probably vipw locks the file till the user gets the passwd i
> believe
>
> I think you can throw more light on this
>
> Regards
>
> Kiran Kumar Puttur

Hi Kiran,

The lock files are interesting. There are two files, /etc/shadow.lock
/etc/passwd.lock

They contain the PID of the command creating them (vipw or useradd) but are
two separate files, not hardlinks. vipw also created a /etc/.pwd.lock file.

They are created when a user is made with useradd, regardless of if you feed a
password as an arg, and are removed with userdel. If I create 2 users in a
row, the numeric string in the files changes, if I then remove any of users,
the files are removed.

Changing a users passwd or locking/unlocking an account does not change,
create, or remove the files.

In a sence they are left over/broken lock files as they are only applicable if
the number they contain represents a running process. Once the PID is gone
useradd or vipw exits, the locks no longer apply and should probably have
been removed by the process that created them. There may be a bugreport on
them, I never looked.

--
Pete Nesbitt, rhce


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list