/etc/nsswitch.conf
authorOleksandr Gavenko <gavenkoa@gmail.com>
Mon, 04 Jan 2021 10:47:28 +0200
changeset 2496 1251d8e57794
parent 2495 a90ed5421848
child 2497 8407a34a1b5d
/etc/nsswitch.conf
cygwin.rst
--- a/cygwin.rst	Mon Jan 04 10:39:03 2021 +0200
+++ b/cygwin.rst	Mon Jan 04 10:47:28 2021 +0200
@@ -96,6 +96,25 @@
 Altering ``LANG`` for anything other then ``C`` cause only problems, when you get help and error
 messages in non-English. It is mostlry impossible to search for keywords, when text are translated.
 
+Users
+=====
+
+Cygwin allow complex mapping Windows accounts to POSIX:
+
+https://cygwin.com/cygwin-ug-net/ntsec.html
+  POSIX accounts, permission, and security.
+
+Modern Cygwin (v3.x) relies on ``/etc/nsswitch.conf`` for user settings. That means there are no
+``/etc/passwd`` & ``/etc/group`` and user home directory and login shell is defined according to
+``nsswitch.conf``.
+
+Earlier Cygwin used ``/etc/passwd`` & ``/etc/group`` and sometimes you were required to regenerate
+them::
+
+  $ mkpasswd -d | grep $yourlogin > /etc/passwd
+  $ mkpasswd -l > /etc/passwd
+  $ mkgroup -l > /etc/group
+
 Documentation
 =============
 
@@ -305,15 +324,6 @@
 https://chromium.googlesource.com/chromium/src/+/master/docs/cygwin_dll_remapping_failure.md
   Handling repeated failures of rebaseall to allow cygwin remaps.
 
-Recreate /etc/passwd and /etc/groups.
-=====================================
-::
-
-  $ mkpasswd -d | grep $yourlogin > /etc/passwd  # if you in Windows domain
-  $ mkpasswd -l > /etc/passwd                    # if you in Windows domain
-
-  $ mkgroup -l > /etc/group
-
 Adding mount points
 ===================