Greg Wooledge wrote:
> On Sun, Apr 07, 2013 at 01:13:09AM -0700, Linda Walsh wrote:
>>> getent passwd 'Domain Administrator'
>> Domain Administrator:x:500:18:Domain Admin accnt:/home/root:/bin/bash
> 
> getent(1) is fine where it's available, but it's not a standard tool,
> so you can only use it on systems that have it.
> 
> If one's hypothetical tilde-expanding script only needs to run on recent
> Linux systems, for example, then getent is a good approach.
> 

Have you encountered it on other linux systems?

I only have evidence that it was from suse (thus the source link),
which would work for personal or limited use, but, as you say, suffers
from portability issues.

Certainly, I'd think that parsing /etc/passwd would be more portable as
it could likely be adapted to the other methods given programs that
are similar to getent that provide database entries (passwd  lines)
like with yp/nis.



Reply via email to