This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ssh login reports "Could not chdir to home directory /home/root: Bad address"

If you could repeat the information below for a machine with the latest
Cygwin and OpenSSH, along with your '/etc/passwd' and 'cygcheck -srv'
output, that may be helpful.

On 3/11/2014 9:36 AM, Ernesto Puig Rodriguez wrote:

Hi Larry,

After analyzing the debug information you recommended, I was still not able
to find the reason of the error message during the ssh login. Below the
output of the commands after the login.

$ ssh root@winsrv2008
root@winsrv2008's password: ******
Last login: Fri Mar  7 16:16:51 2014 from  hostname dot com
Could not chdir to home directory /home/root: Bad address
entering /etc/profile

root@winsrv2008 ~
$ pwd

root@winsrv2008 ~
$ ls -l
total 88
-rw-r--r--  1 root Administrators 88080 Feb 27 18:00 cygcheck.out
drwxr-xr-x+ 1 root Administrators     0 Jan 22 15:47 perl5

root@winsrv2008 ~
$ ls -dl .*
drwxr-xr-x+ 1 root Administrators    0 Feb 28 15:52 .
drwxrwxrwt+ 1 root None              0 Feb 28 15:40 ..
-rw-------  1 root Administrators 7953 Mar  7 16:26 .bash_history
-rwxr-xr-x  1 root Administrators 1494 Feb 28 15:52 .bash_profile
-rwxr-xr-x  1 root Administrators 6054 Jan 15 11:14 .bashrc
-rw-------  1 root Administrators   87 Jan 21 09:32 .cvspass
-rwxr-xr-x  1 root Administrators 1919 Jan 15 11:14 .inputrc
-rw-------  1 root Administrators   49 Feb 18 09:54 .lesshst
-rwxr-xr-x  1 root Administrators 1236 Jan 15 11:14 .profile
drwx------+ 1 root Administrators    0 Mar  3 08:56 .ssh

root@winsrv2008 ~
$ id
uid=500(root) gid=513(None) groups=513(None),544(Administrators),545(Users)

root@winsrv2008 ~
$ getfacl -d /home/root
# file: /home/root
# owner: root
# group: Administrators

root@winsrv2008 ~
$ cacls "c:\cygwin\home\root"
c:\cygwin\home\root WINSRV2008\Administrator:F
                     CREATOR OWNER:(OI)(CI)(IO)F
                     CREATOR GROUP:(OI)(CI)(IO)R

The output of ssh -v -v -v ...
(See attached file: ssh-v-v-v.out)
The debug info of sshd in /var/log/messages ...
(See attached file: sshd_dbg)

The only customized change in /etc/sshd_config is the debug flag one:
LogLevel DEBUG3

Thanks,  Ernesto.

On 2/27/2014 2:07 PM, Ernesto Puig Rodriguez wrote:

When I log in into my Windows Server 2008 R2 using ssh, I get the following

$ ssh root@winsrv2008
root@winsrv2008's password: ********
Could not chdir to home directory /home/root: Bad address

This is independent on whether I log in with the root user who is mapped to
the Administrator in the /etc/passwd or not using another user of the group
Administrators. The sshd daemon is able to log me in and everything seems
fine, but this error is telling me something is wrong in my machine which I
was not able to find till now. I have also re-installed cygwin and upgraded
ssh with the level OpenSSH_6.5p1-1 without success.

What does 'pwd' say after you login? Does '/home/root' exist? If so, what
are the permissions it shows (for each of ls -l, getfacl, cacls)?

Looking at the output of ssh -v -v -v may help.  Setting up a sshd service
to run debug and looking at that output will probably be more help.


Problem reports:
Unsubscribe info:



A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]