public inbox for cygwin-xfree@sourceware.org
help / color / mirror / Atom feed
* Problems with users home directory on cygwin64 on Windows 10
@ 2018-02-07 15:08 Steinar Bang
  2018-02-07 18:15 ` Ross Boulet
  0 siblings, 1 reply; 3+ messages in thread
From: Steinar Bang @ 2018-02-07 15:08 UTC (permalink / raw)
  To: cygwin-xfree

Platform: Intel i7, Windows 10 Pro
	  Cygwin64

I installed cygwin X yesterday (basically the xorg-server, xlaunch,
lxterminal, openssh and mosh).  SSH doesn't work in the resulting
installation because cygwin believes the home directory is /home/sb.

I have set HOME as an environment variable, that in cygwin looks like:
 HOME=/cygdrive/d/Profiles/sb

getent reports the following:
 sb@ITEM-S63383:~$ getent passwd sb
 sb:*:1294839:1049089:U-AD-ONE\sb,S-1-5-21-2260904419-1400770398-4175912926-246263:/home/sb:/bin/bash
 sb@ITEM-S63383:~$

The user "sb" is an AD user and the computer belongs to an active domain.

I have tried the following:
 1. Adding the following line to the /etc/nsswitch.conf file (also known
    as C:\cygwin64\etc\nsswitch.conf ):
     db_home:  windows
 2. Stopped all cygwin windows, but this didn't help
 3. Changed the config to
     db_home:  /%H
 4. Stopped all cygwin windows, but the home directory was still
    /home/sb
 5. Changed the /etc/nsswitch.conf file back to
     db_home:  windows
 5. Rebooted, but home directory was still /home/sb
 6. Checked for /etc/password and/or /etc/group, but no such file were
    present

Any ideas?

Thanks!


- Steinar


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Problems with users home directory on cygwin64 on Windows 10
  2018-02-07 15:08 Problems with users home directory on cygwin64 on Windows 10 Steinar Bang
@ 2018-02-07 18:15 ` Ross Boulet
  2018-02-08 17:23   ` Steinar Bang
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Boulet @ 2018-02-07 18:15 UTC (permalink / raw)
  To: cygwin-xfree

> -----Original Message-----
> From: cygwin-xfree-owner@cygwin.com [mailto:cygwin-xfree-
> owner@cygwin.com] On Behalf Of Steinar Bang
> Sent: Wednesday, February 07, 2018 9:07 AM
> To: cygwin-xfree@cygwin.com
> Subject: Problems with users home directory on cygwin64 on Windows 10
> 
> Platform: Intel i7, Windows 10 Pro
> 	  Cygwin64
> 
> I installed cygwin X yesterday (basically the xorg-server, xlaunch, lxterminal,
> openssh and mosh).  SSH doesn't work in the resulting installation because
> cygwin believes the home directory is /home/sb.
> 
> I have set HOME as an environment variable, that in cygwin looks like:
>  HOME=/cygdrive/d/Profiles/sb
> 
> getent reports the following:
>  sb@ITEM-S63383:~$ getent passwd sb
>  sb:*:1294839:1049089:U-AD-ONE\sb,S-1-5-21-2260904419-1400770398-
> 4175912926-246263:/home/sb:/bin/bash
>  sb@ITEM-S63383:~$
> 
> The user "sb" is an AD user and the computer belongs to an active domain.
> 
> I have tried the following:
>  1. Adding the following line to the /etc/nsswitch.conf file (also known
>     as C:\cygwin64\etc\nsswitch.conf ):
>      db_home:  windows
>  2. Stopped all cygwin windows, but this didn't help  3. Changed the config to
>      db_home:  /%H
>  4. Stopped all cygwin windows, but the home directory was still
>     /home/sb
>  5. Changed the /etc/nsswitch.conf file back to
>      db_home:  windows
>  5. Rebooted, but home directory was still /home/sb  6. Checked for
> /etc/password and/or /etc/group, but no such file were
>     present
> 
> Any ideas?
> 
> Thanks!
> 
> 
> - Steinar
> 
> 
> --
[Ross Boulet] 

Have you tried running mkpasswd? The man page for mkpasswd looks like it might accomplish what you want.

Also, this mailing list is deprecated. Please see https://cygwin.com/ml/cygwin-xfree-announce/2015-03/msg00001.html


-Ross


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problems with users home directory on cygwin64 on Windows 10
  2018-02-07 18:15 ` Ross Boulet
@ 2018-02-08 17:23   ` Steinar Bang
  0 siblings, 0 replies; 3+ messages in thread
From: Steinar Bang @ 2018-02-08 17:23 UTC (permalink / raw)
  To: cygwin-xfree

>>>>> Ross Boulet <rossb@rossb.com>:

> Have you tried running mkpasswd? The man page for mkpasswd looks like
> it might accomplish what you want.

Thanks! That worked!

Here's what I did:
 1. Let the mkpasswd program create an /etc/passwd for my user
     sb@ITEM-S63383:~$ mkpasswd -c -p "$(cygpath -H)" >/etc/passwd
     sb@ITEM-S63383:~$

 2. Checked the content of the generated /etc/passwd
     sb@ITEM-S63383:~$ grep sb /etc/passwd
     sb:*:1294839:1049089:U-AD\sb,S-1-5-21-2260904419-1400770398-4175912926-246263:/cygdrive/d/Profiles/sb:/bin/bash
     sb@ITEM-S63383:~$

 3. Checked what getent said and it still gave /home/sb as the home
    directory
     sb@ITEM-S63383:~$ getent passwd sb
     sb:*:1294839:1049089:U-AD\sb,S-1-5-21-2260904419-1400770398-4175912926-246263:/home/sb:/bin/bash
     sb@ITEM-S63383:~$

 4. Stopped all cygwin windows

 5. Started a new cygwin window and now the home directory was correct
     sb@ITEM-S63383:~$ getent passwd sb
     sb:*:1294839:1049089:U-AD\sb,S-1-5-21-2260904419-1400770398-4175912926-246263:/cygdrive/d/Profiles/sb:/bin/bash
     sb@ITEM-S63383:~$

> Also, this mailing list is deprecated. Please see
> https://cygwin.com/ml/cygwin-xfree-announce/2015-03/msg00001.html

Ah, sorry about that!  Old habit!

Next time I will use the main cygwin mailing list. :-)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-08 17:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-07 15:08 Problems with users home directory on cygwin64 on Windows 10 Steinar Bang
2018-02-07 18:15 ` Ross Boulet
2018-02-08 17:23   ` Steinar Bang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).