How to handle changed user ID
Corinna Vinschen
corinna-cygwin@cygwin.com
Thu Dec 7 16:43:00 GMT 2017
On Dec 7 09:12, cyg Simple wrote:
> On 12/7/2017 2:50 AM, Thomas Wolff wrote:
> > I had to delete a corrupted Windows account and recreate it.
> > For cygwin, the new account, although with the same name, has a
> > different user id.
> > Of course, this creates access problems for existing files (even if they
> > appear to have the same user in ls -l, because the *old user* is still
> > listed in /etc/passwd).
> > Is there a canonical solution to this problem, other than running chown
> > -R $USER ~ ?
> > Can the new user be forced to use the previous user ID?
>
> What happens if you simply remove /etc/passwd and /etc/group files? A
> change long ago caused these files to not be needed.
>
> You may need to take ownership of the directories and their files at the
> Windows system level.
Definitely, and this is independent of Cygwin. The files have been
created with the Windows SID of the old user and thus the ownership
is still set to the old user. Either taking ownership in Windows,
or starting a shell as admin and using chown -R (or more intelligent
variations using find) should do it.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20171207/7af3052c/attachment.sig>
More information about the Cygwin
mailing list