delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/11/02/01:35:55

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4D4263858013
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1604298908;
bh=egpWz4yXvJ5j93vZBteQovZCu1bNBGE5NSAYRgXFEKg=;
h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
From;
b=dIzqnjPvGjaJnKRFL1+V3FwTJ3FPHpFOBWQOLAhyWHKvE+OabDcB+UicoPH2cEBWm
FlWdW9M6yQLItvORormNCAK7Hg72c43gM9M38M4Y14BtEPQum8+HyOkluLLV1l9Ans
PUK6pwPlu0Cq3wDVba3eEXervYXp4AXQRP+7RZi8=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org D44333858009
Date: Mon, 2 Nov 2020 09:33:10 +0300
X-Mailer: The Bat! (v6.8.8) Home
X-Priority: 3 (Normal)
Message-ID: <981695207.20201102093310@yandex.ru>
To: =?utf-8?Q?David_Bala=C5=BEic?= <xerces9 AT gmail DOT com>, cygwin AT cygwin DOT com
Subject: Re: Conflict if same username local and in domain
In-Reply-To: <CAPJ9Yc_zGA++VuVqS9aLh4GbhV3dA-CvXk7prrnAg8AeyCPnQQ@mail.gmail.com>
References: <CAPJ9Yc8QBJT9yAbE6QB1TZGTWtOd8mHkgZ5534ZnnOKs0jh4bg AT mail DOT gmail DOT com>
<5F9B291F DOT 7060806 AT tlinx DOT org>
<CAPJ9Yc_zGA++VuVqS9aLh4GbhV3dA-CvXk7prrnAg8AeyCPnQQ AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT,
NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: Andrey Repin via Cygwin <cygwin AT cygwin DOT com>
Reply-To: cygwin AT cygwin DOT com
Cc: Andrey Repin <anrdaemon AT yandex DOT ru>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 0A26ZaBR026425

Greetings, David Balažic!

Please no top-posting in this list.

>>
>> On 2020/10/29 05:39, David Balažic via Cygwin wrote:
>> > Hi!
>> >
>> > I started Cygwin Terminal to find out, I landed in the other users
>> > home folder and have no write access.
>> >
>> ----
>>     I have the same username, but not the same "home" directory.
>> The user that signs in 1st gets the short name, the 2nd login gets
>> the domain or system name appended like
>> /users/linda/local-account
>> /users/linda.domain/domain account.
>>
>>     Both of the user names have uniq windows UUID's and I have both in my
>> /etc/passwd.
>>
>>     The two directories SHARE many of the same files -- so both my logins
>> are in a common 'local' group (like 'lindaGroup'), and since the machine
>> is in the domain, I can create a 'domain\lindagroup' and on my local
>> machine, both logins are in that group -- for that matter, the domain group
>> is also in the local group -- so theoretically I could just put both logins
>> in the domain group.
>>
>> Anwyay, it DOES work -- it just has to be configured right.
>>
>> So you say you got /home/joe for both -- but don't they have a /user
>> directory
>> that is different for each?
>>
>> just point your /home/=>/User, or if you really want them separate, then
>> have /home/joe point to /Users/joe/home, and the domain should get
>> joe.dom so /home/joe.dom => /Users/joe.dom/home.
>>
>> I started with my /home dir pointed at my the same dir as my /users dir, so
>> by default, windows separated them.
>>
>> Both my userid and username are different -- have 2 entries in /etc/passwd:
>>
>> Bliss\linda:*:5013:201:L A
>> Walsh,U-Bliss\linda,S-1-5-21-33333-77777-33333-5013:/Users/linda.Bliss:/bin/bash
>> linda:*:1000:1015:U-Athenae\linda,S-1-5-21-188-75-11-1000:/Users/linda:/bin/bash
>>

> I don't have any of  /user /users /User /Users folders on my setup.
> Do you mean C:\Users ?

No, that's how her system was set up.

> Even if I symlink it, won't that just change the location, but not the
> used usernames?

True.

> As for /etc/passwd , I don't have that file.

And you generally don't need it.

> /etc/nsswitch.conf  is empty (only comments).

But you could configure it to your liking.

Me, personally, I'm using a combination of

$ cat /etc/fstab
none /cygdrive cygdrive noacl,binary,nouser,posix=0 0 0
none /tmp usertemp binary,nouser,posix=1 0 0
C:/Users /home bind noacl,binary,exec,posix=0 0 0

$ cat /etc/nsswitch.conf
passwd: db
group: db

db_enum: all

db_home: cygwin desc windows
db_shell: cygwin desc windows

$

This way, I have /home as a convenient access point, while real profile
locations are controlled by Windows itself.


-- 
With best regards,
Andrey Repin
Saturday, October 31, 2020 18:46:05

Sorry for my terrible english...
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019