Cygwin help needed. Environment variables incorrect after adding ssh keys
We setup ssh keys between our new PPM Linux server and our Windows build server running Cygwin. Everything connects fine. However we get permissioned denied if we try to run a script or create a directory etc. I compared an ssh connection from another PPM server that does not use ssh keys and noticed 'env' variables are different. The one without ssh keys works fine, and USERDOMAIN and USERNAME match our non human id we use. The server with ssh keys the USERDOMAIN is the local server name and USERNAME is sshd_server (which doesnt have rights to our home folder). I've been searching for hours on this dumb issue and cant figure it out. Its something to do with sshd service and environment variables. Anyone know how to fix this? Do we need to add something to the .profile?
Have you reviewed Cygwin's /etc/passwd and /etc/group files. I assume that your Domain user, is not associated with an entry in the /etc/passwd file or the /etc/group file needs to be added to. Potentially, it is assicated with group none (513).
ssh -vvv domain/username@hostname
would tell you the groups you associated.
You could update, the passwd and group file by remoting to machine and clicking on cygwin.
mkpasswd -d Domain -u User
would give you the entry for your passwd file.
example to add the line to passwd file after test:
mkpasswd -d mydomain -u chris *Just echos it out for verificaiton
mkpasswd -d mydomain -u chris >> /etc/passwd * appends it to the /etc/passwd file
Sometimes it is best to first create 'Domain Admins' 'Domain Users'
mkgroup -d mydomain -g 'Domain Admins'
mkgroup -d mydomain -g 'Domain Users'
After you test the commands >> /etc/group or copy the line to the file.