Ed Brown wrote: > On Tue, 2006-03-21 at 10:10 -0500, Brian E. Seppanen wrote: > > > Does someone know of an easier way of testing for the existence of a > > user that wouldn't require a call to getent? Just wondering if there > > is a better solution out there. > > Don't know if this is better, but it is quieter: you can also 'grep > -q' for the username in /etc/passwd. Only works for locally maintained > account info of course, where getent will use NIS or LDAP or whatever > else you have configured.
I also use the return value of the id command line tool to test for the existence of users. Best, Brendan -- Senior System Administrator The University of Chicago Department of Computer Science http://www.cs.uchicago.edu/people/brendan http://praksys.blogspot.com/ _______________________________________________ Help-cfengine mailing list Help-cfengine@cfengine.org http://cfengine.org/mailman/listinfo/help-cfengine