delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/01/11:31:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 1 Oct 2003 11:31:07 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Olaf F=?iso-8859-1?q?=F6llinger?= <of AT bln DOT sesa DOT de>
cc: cygwin AT cygwin DOT com
Subject: Re: What are the correct permissions for cygwin and how do I set
them ?
In-Reply-To: <20031001144216.8C204CB91@imap.bln.sesa.de>
Message-ID: <Pine.GSO.4.56.0310011117320.26607@slinky.cs.nyu.edu>
References: <20031001144216 DOT 8C204CB91 AT imap DOT bln DOT sesa DOT de>
Importance: Normal
MIME-Version: 1.0

On Wed, 1 Oct 2003, Olaf Föllinger wrote:

> Hi,
>
> I'm using w2k. Today I've been migrated to a new domain so now I do have
> new sids.
>
> Of course the permissions of my files are now wrong. How do I correct
> them ? Whome they should belong to ? I've renewed /etc/passwd and
> /etc/groups using
>
> mkgroup -d >/etc/group
>
> mkpasswd -d >/etc/passwd
>
> but this seems not enough. What else should I try ? E.g. mutt dumps
> while accessing a local mailbox.
>
> Gruss Olaf Föllinger

Olaf,

Do you mean that you are now logging in as another domain user?  You
should then simply chown any files that were owned by the old user to the
new user...  I'd suggest finding out the UID of the old domain user (by
doing "ls -lnd ~", for example (if the username didn't change), and then
running something like

<UNTESTED>
  export OLDUID=`ls -lnd ~ | cut -d ' ' -f 4`
  export UID=`id -u`
  chown -R --from=$OLDUID $UID
</UNTESTED>

Alternatively, you could try a more conventional command, e.g.,

<UNTESTED>
  find / -user $OLDUID -print0 | xargs -0 -n 50 chown $UID
</UNTESTED>

You may need to change the group as well if the domain has different group
SIDs.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

- Raw text -


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