[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Q



On Thu, 29 Jan 1998, Erez Doron wrote:

> Hi
> 
> does anybody knows of a unix command that
> checks if a there is such a user on the system ?
> 
> i meen that I'll ask if there is a username 'yossi' or 'moshe'
> on this host, and I'll get an answer
> 
> ( do not tell me 'finger', this requires a daemon )
> 
> regards
> Erez.
> 
> 
> 
> 
> 
> 

echo "Test" | mail -s "test" thatuser@thathost is the only one from the
outside, if there is no fingerd. If there is no user, the mail will
bounce. There is also rwhod (RTFM), which is a daemon too, but usually
disabled. On the local machine, it is who (RTFM).  Also, ps -ax | grep
<someone> will reveal daemons that run as some user on the local machine. 

If all you have is email, you can try to make xt or expect talk to the
SMTP port of the machine. If it is NOT a forwarding host, then this SMTP
dialog should work online:

telnet there 25
220 I am a great mailer V35578, made by a genius. I'm telling you
  this, so you know what weaknesses I may have, from the source that is
  in the public domain. Please
  do hack me. Thank you. 
HELO from.here
250 blabla
MAIL FROM: <me@here>
250 blabla
RCPT TO: <him> <- note: not a qualified mail address, just the user logname
550/250 <- this returns a NAK or OK depending on whether takes that user.
... more of the same
QUIT

To find out, if the host is forwarding, give yourself as recipient (fully
qualified) in a RCPT TO: request. If the host takes it, it is forwarding.
If it is forwarding then you can't use the method above online, and have
to wait for the bounce message. If not forwarding, then test all the users
you want to using more RCPT TO: requests, and then close the connection
with QUIT. No need to send data.

hope this helps,
	Peter