* RE: Windows login name, USER and HOME env variables..
@ 2001-09-12 7:49 Schaible, Jörg
2001-09-12 8:10 ` Ronald Landheer
0 siblings, 1 reply; 3+ messages in thread
From: Schaible, Jörg @ 2001-09-12 7:49 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 957 bytes --]
Hi Ronald!
> a. Where does Bash get the space from? (the registry key mentioned
> above, or elsewhere?)
> b. Idem for CVS - isn't that supposed to use the $HOME variable to
> find out where my files live (and where it should plant the .ssh
> dir)?
Easy: Any app that requests the *system* for your user name, will get the
real one.
> c. Other than logging in under another name, is there a workaround?
Also have a look at your /etc/passwd that was also generated using system
functionality. I am quite not sure whether you may override the system's
user name here or not, since I do not know how the ported Unix apps really
retrieve the user's name.
> d. Should this be considered a bug?
IMHO no.
Regards,
Jörg
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Windows login name, USER and HOME env variables..
2001-09-12 7:49 Windows login name, USER and HOME env variables Schaible, Jörg
@ 2001-09-12 8:10 ` Ronald Landheer
0 siblings, 0 replies; 3+ messages in thread
From: Ronald Landheer @ 2001-09-12 8:10 UTC (permalink / raw)
To: Schaible, Jörg, cygwin
Hello Jorg,
You wrote:
> I wrote:
>> a. Where does Bash get the space from? (the registry key mentioned
>> above, or elsewhere?)
>> b. Idem for CVS - isn't that supposed to use the $HOME variable to
>> find out where my files live (and where it should plant the .ssh
>> dir)?
> Easy: Any app that requests the *system* for your user name, will get
> the real one.
Okay, but is CVS supposed to reconstruct the home directory path by
itself? IMHO, it should just check the HOME variable and take it from
there.. (and then, it should find the name w/o the space..).
>> c. Other than logging in under another name, is there a workaround?
> Also have a look at your /etc/passwd that was also generated using
> system functionality. I am quite not sure whether you may override the
> system's user name here or not, since I do not know how the ported
> Unix apps really retrieve the user's name.
.. which is exactly what I don't know either.
You're right that the passwd file, though - I'm taking a look..
Yup.. that works..
>> d. Should this be considered a bug?
> IMHO no.
I'd consider it weird anyway :)
Does any1 here know why CVS reads the passwd file rather than the HOME
and USER env vars?
Greetz!
Ronald
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Windows login name, USER and HOME env variables..
@ 2001-09-12 6:31 Ronald Landheer
0 siblings, 0 replies; 3+ messages in thread
From: Ronald Landheer @ 2001-09-12 6:31 UTC (permalink / raw)
To: cygwin
Hello all,
I'm just wondering about something here: I've patched up my profile
script like this:
-- BEGIN diff -u profile~ profile --
--- profile~ Wed Sep 5 12:17:56 2001
+++ profile Wed Sep 5 12:32:18 2001
@@ -1,6 +1,6 @@
PATH="/usr/local/bin:/usr/bin:/bin:$PATH"
-USER="`id -un`"
+USER="`id -un | sed s/[' '\t]//`"
# Set up USER's home directory
if [ -z "$HOME" ]; then
--- END diff -u profile~ profile ---
This kicks the whitespaces out of the USER, and subsequently the HOME
env variables - works like a charm: when I do printenv | grep Ronald (my
name) I get:
-- BEGIN SNAPSHOT --
Ronald Landheer@ALLY ~
$ printenv | grep Ronald
PWD=/home/RonaldLandheer
USER=RonaldLandheer
HOME=/home/RonaldLandheer
--- END SNAPSHOT ---
Now here's the strange part - and the reason why I'm mailing:
If you look at the "snapshot" above, you'll see by full name four times
- three times without the space, once *with* the space. I.e.: somehow
Bash still knows there's a space in my name!
Another thing: when I try to get developers access to one of my projects
on sourceforge through CVS, it tries to make the directory
"/home/Ronald Landheer/.ssh"
^^^^^-- note the space!
This being slightly annoying, I'd like to know if there's another
workaround than just logging in under another name on my system.
I've searched the Windoze registry for my name and did "cygcheck -s -r |
grep Ronald" which got this from cygcheck:
-- BEGIN SNAPSHOT --
Ronald Landheer@ALLY /etc
$ cygcheck -s -r | grep Ronald
USER = `RonaldLandheer'
HOME = `/home/RonaldLandheer'
--- END SNAPSHOT ---
i.e. the two env vars
From the registry, I got one of my sites on the local server a couple of
times, my mail address, my profile path, some micro$oft program prefs
with my name in it, etc.. I also got the key "HKEY_LOCAL_MACHINE\Network
\Logon" which is actually the only one I thought Cygwin might be
interested in - is it?
In summary, my questions:
a. Where does Bash get the space from? (the registry key mentioned
above, or elsewhere?)
b. Idem for CVS - isn't that supposed to use the $HOME variable to
find out where my files live (and where it should plant the .ssh
dir)?
c. Other than logging in under another name, is there a workaround?
d. Should this be considered a bug?
Greetz!
Ronald
--
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-09-12 8:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-12 7:49 Windows login name, USER and HOME env variables Schaible, Jörg
2001-09-12 8:10 ` Ronald Landheer
-- strict thread matches above, loose matches on Subject: below --
2001-09-12 6:31 Ronald Landheer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).