Cygwin - Cannot or does not create user profile files - /home/User/

3

1

I have a fair amount of experience with Cygwin and it's setup, however this time it is behaving strangely. When I installed it everything seemed to work great, but upon opening the Cygwin prompt I received none of the usual setup your account info lines. Upon looking in my c:/cygwin/home/ directory I found that it did not create a user for me or any of the files it normally does, like .bashrc, etc. I then set Cygwin to run as an Administrator, with no effect. Next I ran the cygwin.bat file as a possible fix suggested it might force the user profile file creation. Next I created a User directory of my name(the same as my windows user account name and what Cygwin is expecting from the /etc/passwd file) and put my .ssh directory in there and was able to use the ssh keys as normal to connect to remote servers. However, Cygwin still did not create any of the Cygwin files. I then chmod'ed the directory to 777 to make sure cygwin could write to it, also with no effect.

So it appears Cygwin is able to read from that directory but cannot or does not even try to create the user files.

DrCord

Posted 2013-09-08T19:05:41.253

Reputation: 162

I'm not aware of any process to auto create this content. The last few times that I have installed Cygwin on a fresh system, I have created the .bash_profile, .bashrc, etc files myself by copying the templates in the /etc/skel folder. – Costa – 2013-09-09T14:25:25.900

hmm, whenever I have installed upon first starting an account it creates those files. – DrCord – 2013-09-09T18:36:02.167

The thing that really makes me think that something is wrong is it fails with a "cannot write" error to add to the known hosts file... – DrCord – 2013-09-09T18:36:58.780

Answers

3

The answer to this question was fairly simple: I was unaware that the windows environment would be the first option for setting the $HOME variable, so cygwin was trying to read my config files from /cygdrive/c/User/[UserName] rather than /home/[UserName]. I put symbolic links to the cygwin location in my Windows user directory and that fixed the issue.

I was able to find enough useful info to help me debug my problem from this related superuser post: Cygwin .bashrc not being source because cygwin starting in Windows home

DrCord

Posted 2013-09-08T19:05:41.253

Reputation: 162