Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Mar 2003 23:44:52 -0800
From:      Kevin Stevens <Kevin_Stevens@pursued-with.net>
To:        Matthew Seaman <m.seaman@infracaninophile.co.uk>
Cc:        questions@freebsd.org
Subject:   Re: File owner name not updated.
Message-ID:  <D4A3ED06-5F5E-11D7-95E4-000A959CEE6A@pursued-with.net>
In-Reply-To: <20030326072922.GA5568@happy-idiot-talk.infracaninophi>

next in thread | previous in thread | raw e-mail | index | archive | help

On Tuesday, Mar 25, 2003, at 23:29 US/Pacific, Matthew Seaman wrote:

> Two things occur to me:
>
>     i) Did root use vipw(8) to edit the passwd database, or otherwise
>        run:
>
>         # cap_mkdb /etc/master.passwd
>
>        when the UID was changed?  It's the value in the hashed
>        database cap_mkdb(1) builds that is used by the system.
>        Updating that should have instantaneous effect.

Just tried running that after creating a dummy user and changing his 
uid from 1005 to 1010.  No change.

> The problem is not with the ls(1) command per se.  It's the underlying
> system library functions such as getpwuid(3) which do the translation
> between numeric UIDs and usernames that are the seat of the problem.
> You can see that by running some other command that uses getpwuid(3), 
> eg:
>
>     % perl -e 'print scalar getpwuid(503), "\n";'

bash-2.05b# perl -e 'print scalar getpwuid(1010), "\n";'
fred
bash-2.05b# perl -e 'print scalar getpwuid(1005), "\n";'
fred

bash-2.05b# grep fred /etc/master.passwd
fred:*:1010:1005:User &:/home/fred:/bin/sh

KeS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D4A3ED06-5F5E-11D7-95E4-000A959CEE6A>