How can I tell what username RSH is sending from SUA?
I am on a 64-bit corporate Windows Vista machine with the Unix Application Subsystem installed and applications loaded. I am trying to use RSH to connect to a FreeBSD server. The command I would like to execute is:
rsh host.suffix1.company.com command
The .rhosts file in my home directory at host.suffix1.company.com looks like this:
+ myusername + mydomain \ myusername + mydomain / myusername + myusername @ mydomain + + mycomputer.suffix2 myusername mycomputer.suffix2 + mycomputer.suffix2.company.com myusername mycomputer.suffix2.company.com +
I know + + is bad, but ignore it this time. When I ran this:
rsh host.suffix1.company.com command
I am getting the following error:
rshd: Login incorrect.
However, when I run
rsh -l myusername host.suffix1.company.com command
it works flawlessly. I'd like to know:
- What is sending SUA as username when I don't specify it via -l?
- How can I change my SUA shipment?
I'm guessing that SUA is submitting some form of mydomain \ myusername here, but I'm wondering what other entries I might need to make to the rhosts file to allow this, and why + + doesn't allow it?
a source to share
I would guess that looking at syslog (or any other suitable log?) In the freebsd box might give you the login name from the failed login. On my linux machine, I get the following lines from frequent ssh attacks:
May 19 19:57:40 anton sshd[29795]: Failed password for invalid user mercedes from 124.217.246.181 port 49198 ssh2
May 19 19:57:40 anton sshd[29796]: Received disconnect from 124.217.246.181: 11: Bye Bye
May 19 19:57:45 anton unix_chkpwd[29802]: password check failed for user (games)
May 19 19:57:45 anton sshd[29799]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns1.1oasis.net user=games
May 19 19:57:48 anton sshd[29799]: Failed password for games from 124.217.246.181 port 49956 ssh2
This is from sshd, but I'd be surprised if rshd was unable to register something like this (although it might be disabled by default and should be enabled).
For the guesses that the rsh client made by microsoft gets the name from me few ideas. A traditional unix rsh will of course get the name from / etc / passwd by reading it indirectly with getpwent () (unless it can revert to environment variables LOGNAME
or USER
?). Is "myusername" present in c: \ windows \ system \ etc \ passwd (or any SUA cards like / etc / passwd)?
a source to share