This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Output from mkpasswd/mkgroup ... Again confused (2)
- From: "Houder" <houder at xs4all dot nl>
- To: cygwin at cygwin dot com
- Date: Thu, 27 Nov 2014 21:12:34 +0100
- Subject: Re: Output from mkpasswd/mkgroup ... Again confused (2)
- Authentication-results: sourceware.org; auth=none
- References: <de348a1a01030b7251083837cb586676 dot squirrel at webmail dot xs4all dot nl> <20141127164116 dot GD3810 at calimero dot vinschen dot de> <33e2a93c42a1b8225736a625a80ab117 dot squirrel at webmail dot xs4all dot nl> <20141127200342 dot GI3810 at calimero dot vinschen dot de>
> On Nov 27 18:41, Houder wrote:
>> > On Nov 27 17:12, Houder wrote:
>> >> Hi Corinna,
>> >>
>> >> For comparison: output of 'mkpasswd -l' with and without /etc/nsswitch.conf present. Without it, my machine
>> >> is NOT a 'foreign machine'. When it is present, my machine is a 'foreign machine'. Strikes me as ...
>> >>
>> >> Until now, I believed that the output of mkpasswd/mkgroup had no dependency on /etc/nsswitch.conf.
>> >
>> > The most recent version has. Here's what happens. If you call mkpasswd
>> > without parameter, it just calls Cygwin's internal enumeration functions.
>> > If you call with -l, it checks if `passwd:' is set to "files" only in
>> > /etc/nsswitch.conf. If so, it uses the old enumeration functions inside
>> > mkpasswd, which don't generate prefixed usernames for local accounts
>> > even on AD machines. However, the uids/gids differ when using this
>> > method. I could change the offset in this case to reduce the chance for
>> > a difference, but hey, there's no good reason to use /etc/passwd at all
>> > in your scenario :}
>>
>> ... ahem, you keep saying that (no need for /etc/passwd) to me :-)) However, my (personal) bin
>> directory has a script called mkpasswd_r(edacted) ... that modifies the uid of some of my users
>> (yes, me, and a few aliases for me).
>>
>> And I am sure, that I am not the only one with a script like that ...
>>
>> Above you are explaining _implementation_ ... not specification.
>
> There is none. It's a helper tool which is supposed to be run only on
> demand, and the uids usually don't matter, as long as they are unique.
>
> But, anyway, you asked for it, you got it. I applied a patch to
> mkpasswd/mkgroup to generate uids/gids for the local machine always
> using the same offset as when Cygwin computes them.
>
> Check out the latest snapshot from http://cygwin.com/snapshots/
Dje... You are still at the office?
Thank you very much!
Henri
=====
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple