in reply to Re: User Existance?
in thread User Existance?

Hi there, Thanks for that. How do i go about using getpwnam to determin whether a user exists? I am currently using it to tell if they have a home directory, and basing whether they exist on that, but it would be much better if i could just use it to find if the account exists.

Replies are listed 'Best First'.
Re: Re: Re: User Existance?
by The Mad Hatter (Priest) on May 17, 2003 at 20:37 UTC
    As I said earlier,
    my $username = "someusername"; print "Username '$username' exists!\n" if getpwnam($username);
      Hi, How comes this does not detect the user root?