-1

If I have the IP address of a computer running Linux is it possible to see which user accounts exist on that computer, without having to ssh into it first?

3
  • 4
    Now, wouldn't that make life so much easier for the bad guys? Commented May 31, 2016 at 11:25
  • Even if you can ssh into a system, that is not enough. You can investigate /etc/passwd, but if you cannot see how PAM is set up on the system you'll be missing other user accounts added through libnss-extrausers or via LDAP etc
    – Anthon
    Commented May 31, 2016 at 12:12
  • @Anthon that's what getent passwd is for....and is why getent should be used in scripts that need to check usernames. groupnames, etc instead of simply grepping the first field of /etc/passwd, /etc/group and so on.
    – cas
    Commented Jun 1, 2016 at 1:13

1 Answer 1

1

Nowadays, on a correctly-configured system there shouldn't be any way of determining this.

On a badly-configured system, you might see different behaviour when attempting to log in depending on whether the user you're trying to log in as exists or not. (Hopefully not in the messages returned, but perhaps in the timing of the responses.)

In the past, finger would have told you:

finger @host

But those days are long gone...

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .