Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: use getpwent to find users and delete them

by Corion (Pope)
on May 18, 2018 at 13:56 UTC ( #1214849=note: print w/replies, xml ) Need Help??


in reply to Re^2: use getpwent to find users and delete them
in thread use getpwent to find users and delete them

I think getpwent expects no parameter. It's unfortunate that it (or Perl) doesn't say so...

Changing your code to use getpwnam instead works for me:

my ( $uid ) = getpwnam($account);

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1214849]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2020-12-01 00:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?