X-Spam-Check-By: sourceware.org From: Markus =?iso-8859-1?q?Sch=F6nhaber?= Reply-To: cygwin AT cygwin DOT com To: cygwin AT cygwin DOT com Subject: Re: Permissions problem - odd setup Date: Tue, 21 Feb 2006 18:16:38 +0100 User-Agent: KMail/1.9.1 References: <022120061644 DOT 14282 DOT 43FB438A000B51A1000037CA22007358340A050E040D0C079D0A AT comcast DOT net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200602211816.39039.mailing-cygwin@schoenhaber.de> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Andrew DeFaria wrote: > Eric Blake wrote: > >>>> I have a somewhat odd setup here and am having a permissions > >>>> problem with my userid and authentication. > >>>> > >>>> In general I'm trying to have one home directory that is shared > >>>> between Windows and Linux. On Windows I use Cygwin. Normally this > >>>> involves mounting my Windows oriented home directory and proper > >>>> generation of my domain userid in /etc/passwd. Here things are a > >>>> bit different. > >>>> > >>>> My home directory here is on a Linux box running Samba. I login as > >>>> \defaria on my Windows box. I have generated my > >>>> /etc/password entry with mkpasswd -d -u defaria > /etc/passwd. > >>>> However the Linux box running Samba does not participate in a > >>>> domain rather it is using > >>>> a workgroup. > > > > I don't have access to a Samba mount point, so maybe my advice won't > > help much, but here goes anyways. > > > >>>> The symptoms that I see are as follows: > >>>> > >>>> While I can create a file in my home directory I cannot edit it - > >>>> access denied: > >>>> > >>>> $ cp opts.cfg opts.cfg.new > >>>> cp: cannot create regular file `opts.cfg.new': Permission denied > >>>> $ ls -l opts.cfg* > >>>> -rw-rw-r-- 1 ???????? ???????? 98 Feb 14 11:17 opts.cfg > >>>> -rwxr--r-- 1 ???????? ???????? 0 Feb 15 16:01 opts.cfg.new* > >>>> > >>>> You'll note that the uid and gid is not correct. > > > > First, have you run mkpasswd and mkgroup to create valid /etc/passwd > > and /etc/group files? Without a valid user database, cygwin gets lost > > when trying to check/display/modify permissions of an unknown user. > > > > http://cygwin.com/cygwin-ug-net/using-utils.html#mkpasswd has more > > details on running mkpasswd. > > I've run mkpasswd but the real question I believe is what domain should > I run mkpasswd for? As I stated above I have run it for the Windows > domain that I log into. However, again, my home directory is served by a > Linux box using Samba but that link box does not participate in the > Windows domain that I log into rather it just runs in it's own workgroup. Don't know if this is of any help: you can set the SIDs for the user and the user's primary group on the Samba box with pdbedit ... -U -G ... Maybe it helps if you use the same SIDs your Windows Domain account has. Regards mks -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/