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]

RFC: 1.7.33 problem with user's home directory


Hi,


after a long discussion in RL today, I came to the conclusion that
there's a major problem in the current handling of the user's home
directory in AD environments in the new user account code when not using
/etc/passwd files.

Here's how it works and how it's documented in the preliminary
documentation at
https://cygwin.com/preliminary-ug/ntsec.html#ntsec-mapping-passwdinfo

- If your account is an AD account, the home directory is taken from the
  RFC 2307 entry unixHomeDirectory.

- Otherwise, if these values are empty or don't exist, your fallback
  home directory is /home/$USER (without domain prefix).

As you may have noticed, there's nothing in there taking the Windows
home directory into account.  It's indeed not used at all by the new
code.

Up to Cygwin 1.7.32, mkpasswd (but not with -u) generated the Cygwin
home directory by converting the SAM/AD home folder entry to POSIX
style, if it's non-empty.  Fallback is /home/$USER.

When I implemented the new scheme I thought it a good idea to decouple
the Cygwin home dir from the Windows home dir.  However, in the today's
discussion the following two arguments came up:

- If you're using the Windows home folder setting to maintain file
  server based home directories, you typically want that these
  directories are used for Cygwin stuff as well (central administration,
  central backup).
  Having to maintain the home directories twice, once in the
  homeDirectory, once in the unixHomeDirectory entry is quite a hassle,
  especially given that unixHomeDirectory does not support variable
  substitution (e.g. "/home/%USERNAME%" won't work).

- If you're already using AD as NIS server, unixHomeDirectory is already
  used for UNIX machines.  Trying to align the unixHomeDirectory for
  Cygwin to homeDirectory for all the rest of Windows will potentially
  become impossible then.

These arguments are quite serious and it questions the "good idea" part
of this change a lot.

What do you think?

Shall the "db" entries utilize the Windows home folder if it exits(*)
and drop using the unixHomeDirectory?  It seems inevitable...


Corinna


(*) This would automatically work for SAM accounts as well because SAM
    provides the same Windows home folder entry.


-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpswWDQlAjTm.pgp
Description: PGP signature


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