Finding the UID for samba users
Paul Howarth
paul at city-fan.org
Fri Aug 5 17:48:15 UTC 2005
Tim Holmes wrote:
>>Tim Holmes wrote:
>>
>>>It appears, that since the users are being validated against the
>
> active
>
>>>directory, there are no entries for them in the passwd database.
>
> The
>
>>>getent passwd command returns no values
>>>
>>>Any other ideas?
>>
>>Are you including the domain name with the username, e.g.
>>
>>getent passwd 'DOMAIN\USER' | cut -d: -f3
>>
>>Paul.
>>
>
> [Tim Holmes]
>
> Paul -- that fixed it -- thanks so much, one more if I could?
>
> Is there a way to just get a complete listing -- perhaps even
> printable??
>
> thanks again
Try this:
getent passwd | awk -F: '{ printf "%-20s %5d %s\n", $1, $3, $5 }' |
LC_ALL=C sort +1
(that's all one line)
Username, UID, Real Name in 3 columns
Might not work if you have "winbind enum users = no" in your samba config.
Paul.
More information about the fedora-list
mailing list