Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Re: SCALAR output instead of attribute name.

by sschneid (Deacon)
on Dec 18, 2003 at 18:45 UTC ( [id://315610]=note: print w/replies, xml ) Need Help??


in reply to Re: SCALAR output instead of attribute name.
in thread SCALAR output instead of attribute name.

1. Disallowing root logins over ssh is fine, but don't they even allow su or sudo? In fact, you should be using those even if you're logging in locally.

Yes, absolutely. But I'm looking to grab a giant list of users from our 90-some *nix boxes. I could use a client-server design, but decided it'd be just as easy to cat /etc/passwd over a (non-privileged) ssh connection and parse the return results on whatever machine the script is being run from.

Make more sense? I'm avoiding Unix::PasswdFile becuase it requires root privileges to use, and I don't want the script to be run as root.

-s.

Replies are listed 'Best First'.
Re: Re: Re: SCALAR output instead of attribute name.
by hardburn (Abbot) on Dec 18, 2003 at 19:00 UTC

    Actually, after looking over some of the source code to Unix::PasswdFile and its parent Unix::Configfile, I wouldn't use it either. It's internals are awful.

    I don't know why you need to be root to use it, though. In any case, there are other /etc/passwd parsing modules on CPAN.

    ----
    I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
    -- Schemer

    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-03-29 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found