delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DomainKey-Signature: | a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; q=dns; s= | |
default; b=MsKwLZCwcaO1Fkj5xpRoYjtd2XzMcKhYTO6GSNu5Fd0Q2G4CCtKlo | |
wiFPHRnRAZbOJ/RSpX22pWwutnxM6gFLjJQsMYXsh4bxKCfMZJuPJsfxu19qzokF | |
zRtVNkr4hKdZFo5VdZ0LcIONxW3gabQS8FgHUxRRaVI3yDURdDeDyk= | |
DKIM-Signature: | v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id |
:list-unsubscribe:list-subscribe:list-archive:list-post | |
:list-help:sender:date:from:to:subject:message-id:reply-to | |
:references:mime-version:content-type:in-reply-to; s=default; | |
bh=BI50ClrqlkUUJLhTNvJA2124lww=; b=vN1r8g7jvLVl2eDLwYVPOZBRDmHu | |
CX96UqBK1JJLfG8MTBY9+LAA0rOdPhg32Lkr1QdHFV1q6o7NhaqG9nwIzVicCP6W | |
dRguM7dikUcUgCYQrm4QME9ShsV4E6sGbR8jYZORge0d2fd3bRPipK/ER0uXUAQt | |
iZZqZtQsGoEkMZs= | |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
Authentication-Results: | sourceware.org; auth=none |
X-Virus-Found: | No |
X-Spam-SWARE-Status: | No, score=-6.0 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 |
X-HELO: | calimero.vinschen.de |
Date: | Mon, 3 Feb 2014 22:05:22 +0100 |
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How big are your /etc/passwd and /etc/group files? |
Message-ID: | <20140203210522.GR2821@calimero.vinschen.de> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <20140131203738 DOT GA8707 AT calimero DOT vinschen DOT de> <CAKf2h5R-FuQX9W=ojw4+ez8gqOHjwYshMh3FmmfNu3r12sRFeQ AT mail DOT gmail DOT com> <20140131220314 DOT GH2821 AT calimero DOT vinschen DOT de> <52EC4727 DOT 2000308 AT gmail DOT com> <20140201102652 DOT GA26805 AT calimero DOT vinschen DOT de> <loom DOT 20140203T183022-692 AT post DOT gmane DOT org> |
MIME-Version: | 1.0 |
In-Reply-To: | <loom.20140203T183022-692@post.gmane.org> |
User-Agent: | Mutt/1.5.21 (2010-09-15) |
--wwU9tsYnHnYeRAKj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Feb 3 17:52, Kurt Franke wrote: > Corinna Vinschen <corinna-cygwin <at> cygwin.com> writes: > > This means, a rewrite of the /etc/passwd, /etc/group reading code from > > "all or nothing" to "one at a time when needed". Maybe that's in fact > > the way to go. >=20 > dbm files was already used in yellow pages two dekades ago. > maybe there are some good examples how to do this (yppasswd etc.) We can't use dbm unless we provide the functions as part of the Cygwin DLL. > > In theory, we don't want to keep the files around anyway. I have > > implemented ways to configure user settings from /etc/passwd (like > > home dir or login shell) in the local SAM or in AD. So the admin > > can switch to centralized maintainance even for Cygwin stuff. >=20 > how to handling setting of the the primary group in /etc/passwd ? I don't understand the question. If your user has an /etc/passwd entry, you can simply change the pw_gid field in the file, just as today. > is it possible to store in in SAM ? In AD the primary group is what's defined in the primaryGroupID field, just as for your Windows user account, so your Cygwin primary group is always the same as the Windows primary group. What your admin set it to, or "Domain Users" by default. In SAM it's always "None". Override is only possible via /etc/passwd for now. So far, the overridable values are defined like this: - In AD, Cygwin will utilize the PosixAccount/PosixGroup entries per RFC 2307, available since Server 2003 R2. For a user uid overrides Windows username gecos adds gecos info unixHomeDirectory sets the Cygwin home directory loginShell sets the login shell uidNumber is used for the mapping from NFS/Samba shares to the Windows/Cygwin uid For a group cn overrides Windows groupname gidNumber is used for the mapping from NFS/Samba shares to the Windows/Cygwin gid =20 - In SAM (only used for local accounts), there are no freely definable fields for users or groups, except for the "Description" field. Therefore, you can set values using a faux-XML syntax in the "Description" field. Here's what is supported right now: <CYGWINNAME:bla/> overrides Windows username/groupname <CYGWINHOME:path/> sets the Cygwin home directory to "path" <CYGWINSHELL:shell/> sets the login shell to "shell" - pw_uid, pw_gid and gr_gid are computed per the SFU rules. Local accounts have a uid/gid of 0x30000 + RID, primary domain accounts have a uid/gid of 0x100000 + RID, accounts from a trusted domain have the uid/gid trusted_domain.posix_offset(*) + RID. If you want to override pw_uid, pw_gid, or gr_gid, you have to add an entry to /etc/passwd or /etc/group. But given that the uid/gid values have no importance, this should not be necessary. Please note that this is all work in progress. Details can still change for one reason or another. The upcoming 1.7.28 Cygwin release will not have any of this. I'll check in the changes only after we released 1.7.28. (*) http://msdn.microsoft.com/en-us/library/windows/desktop/ms722487%28v=3D= vs.85%29.aspx > > On the other hand, we'd like to keep passwd and group for home users > > which don't feel comfortable to make changes to the SAM, but then > > we only need very tiny files with one or two entries anyway. > >=20 > > Reading the files on demand only might be the right thing to do. > > Catching two birds with one stone... >=20 > it may be possible to have both using SAM but with a frontend named > /etc/passwd respective /etc/group >=20 > how about setting up read/write devices for passwd and group contents > in /dev/ directory and just create symobolic links to it in /etc/ ? > changes written to the devices of should be allow only to admins. > such changes then should go done to SAM behind it as only storage locatio= n. >=20 > (this would make cygwin have the most modern handling of theses files > and become an example for the different unices and linux :-) ) That's not feasible. The /etc/passwd and /etc/group files are supposed to stay real files which can be used to override the stuff from AD/SAM for people feeling more comfortable with that. You *can* utilize AD and SAM, but you don't have to. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --wwU9tsYnHnYeRAKj Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJS8ASSAAoJEPU2Bp2uRE+gs+EQAJIh8kFQfjDTJ+G7mylSPWmR 1FaIzMZb8DizcO1R5xyNfQeSVb/+LfslSnrseVI1hoELPatIv1p3TE7m4lKoLYcJ 2+fnh9j9E1nVkRKFtOD0AQIffpwRZROun10eC95OzXXSjfRizAn7CB2pxUwWok9x qdiIMvcEfjAdNp1BzxJr3PYQ92EbJDIIJNcTOt401FuwHX6aS4SGBpaHWc0yoIYX DjV1tRP1ei6Q8JK5mQ5ElrPj657J77jwB38fkwERflPVULir1whWgq/FTIk899XD Fl58bE35Xw77yS2IKS2Tdm4q6aMTXIBOG3aMLC3ILoJ0PyeyKlNcGYSafuM2EFHI yK4iU3UuMO/IbMpmhD99XF6RbjIyyE6P6WPGwKyukRn1zFCS8Iainvoh28yvXXw0 JMgdStoUVi1hwoz/97Q9GPVCf0i2oJL01HlxmOCGwHNTv/g0dyCXGQs2esTjIGeb uyoPZ0O2Z9rW8IWFoLWwXLYheXFHMuaQA54WdKo249va+4wU0hVE757ho3VMeDrm FUvCVbBlSfAnzU+/oQqPhKczwR1fP9iVpJ1Q0o5d8DFL3sdcHzUG1K4AlvFaw6Nz ZmnEnME46dYYHC30+CCYwnr2kM+gUSR6uEuP44U/L5Cal6xHfpeOFYEl17zai/H9 ngkmUbUThtKJmK9/3OSf =FVWW -----END PGP SIGNATURE----- --wwU9tsYnHnYeRAKj--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |