This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: HOME set to / [Was: cygwin-1.3.16-1]


Arthur,

As far as I can tell running the latest Cygwin and Cygwin package set, the "id" command still works just fine:

% id
uid=1002(RSchulz) gid=513(None) groups=513(None),544(Administrators),547(Power Users),545(Users)

% id -un
RSchulz


By the way, "id" is not a built-in in the shell built-in sense. It is a conventional binary found in "/bin."

Furthermore, though I do not set HOME or USER in my Windows environment, they're set properly by the default "/etc/profile" script.

Other functions of /etc/profile (running scripts in /etc/profile.d, e.g.) work as expected, too.


Perhaps in your absence when your system name was changed, a registry "clean-up" was performed by your friendly neighborhood sysadmin (they tend to do such things if not watched closely) and in doing so you lost your Cygwin mount table, which is stored in the Windows registry. Considering the fact that without a mount table Cygwin doesn't even have a root directory, almost anything could go wrong. Your symptoms are possibly consistent with such a problem.

Have you noticed other local customizations and settings having been lost or reverted to defaults? Perhaps the system name change orphaned the portion of your registry in which the Cygwin settings are stored? This is admittedly a hunch, since I have a spotty and shallow understanding of the organization of the Windows registry and how the various "hives" are organized and how they relate to things like individual users and machine names.

One other thing, are you using a roaming profile? Perhaps that has something to do with it.


Regardless of the actual details of the problems you're experiencing, I do not believe your prescription for a "fix" to /etc/profile is actually indicated.


Lastly, I don't know what's meant by a "weather change."

Randall Schulz
Mountain View, CA USA


At 16:45 2002-12-09, Arthur I Schwarz wrote:
On Wed, Dec 04, 2002 at 10:46:42AM -0000, John Morrison wrote:
> > From: Chris Game
> >
> > In an earlier post, John Morrison wrote:
> >
> > [...]
> > - now how do I get out of this 'None' group
> > that I'm apparently in, and into 'Users' or even 'Administrators'?
>

FYI: There has been a weather change (see Cygwin Reinstall Failure). Apparently the 'newer' versions of cygwin no longer support the 'id' function/builtin. As a result the /etc/profile script needs to be changed to create the USER and HOME environment variable. I haven't done any research to find out whether there is an automatic way to detect who I am ('who' not supported) so I hard-coded the answer.

To get a correctly running interactive login script do:

change /etc/profile to define USER and HOME correctly
change /etc/passwd to define USER correctly (I did it with notepad)
change /etc/group to define the USER group correctly, as needed

I usually run 'd2u' (dos to unix) on passwd and group to get them in the Unix format. This is probably unnecessary.

The passwd/group entries will determine the group name. I usually become a 'super-something', 'hero', 'simple-user' or somesuch at my whim.

I don't know when the changes were made. I discovered the fix by looking at the bash man pages and tracing through the invocation order and then manually making the fixes. However, there seems to be other things broken in my version (cygwin 1.3.17-1), passwd and more come to mind, and others will show up in time. Sigh.

Corinna provided a description of a 'normal' passwd file. This is further described in the cygwin user's guide.

A lot of reading.

And other users have mentioned this in their e-mails.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]