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 From: "Dave Korn" To: "'Cygwin List'" Subject: RE: Fwd: Lost user/group permissions after reinstallation of Cygwin Date: Mon, 19 Sep 2005 17:22:48 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <6.2.1.2.0.20050918224219.04e79bd8@pop.prospeed.net> Message-ID: ----Original Message---- >From: Larry Hall >Sent: 19 September 2005 03:50 > At 12:28 PM 9/17/2005, you wrote: >> ---------- Forwarded message ---------- >> From: Krister Svanlund ^^^^^^^^^^^^^ Larry? You know what I'm about to say, so I won't even say it! :) >> Date: Sep 17, 2005 5:22 PM >> Subject: Lost user/group permissions after reinstallation of Cygwin >> I have major problems here, I reinstalled my computer, and while doing >> this i removed cygwin (except for my home directory) and when i later >> reinstalled cygwin its all fubar. I don't have permission to read, >> write, execute, delete, rename, flush down the toilet or anything... >> on certain files atleast. As I have noticed all the user and group >> settings for the files are set to question marks (? that is). > From your general description it sounds like > '/etc/postinstall/passwd-grp.sh' didn't run. Check if this file exists > or if one with the suffix of ".done" exists. If the latter, run the > script and rename it with the ".done" suffix. Otherwise, check your > '/etc/passwd' and '/etc/group' files to see if your user name and group > are in these files. If not, read 'man mkpasswd' and 'man mkgroup' to > find out how to generate the files to contain the info you need. I think the problem is actually more likely to be that reinstalling the OS on top of the existing system will have generated an entirely new machine SID and hence new user account SIDs, and so all the ACLs on the old files from before the reinstall will be related to SIDs that no longer make any sense at all to the security subsystem. If this was an entire cygwin tree, it would be practically impossible to recover, but since it's the home dir and nothing else, all that Krister should need to do is 1) regenerate the /etc/passwd and /etc/group files, then 2) cd into the home dir, and "chown -R *" to take back all the files. The username should be Krister's login username, and group should be either "Users" or "Domain Users", according to whether Krister's login is a local account or a domain account. In fact, the simplest way to figure it out (automatically) might be something like: mkpasswd -l [-d if in domain] > /etc/passwd mkgroup -l [-d if in domain] > /etc/group touch /foo.bar chown -R --reference=/foo.bar ~ ...or words to that effect. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/