Slave's Cygwin Shell Is Not Owned by Slave User

30 views
Skip to first unread message

Eric Blom

unread,
Dec 9, 2015, 7:52:33 PM12/9/15
to Jenkins Users
Hello All,
I've run into a problem with my Windows slaves that are using ssh and haven't been able to find a solution. The problem is that the command shells I'm getting with these windows slaves are owned by the privileged user (cyg_server) and not the slave user (jslave). When a job runs that needs the permissions of the slave user (jslave) it fails because the shell user is cyg_server. The "slave user" is the username and password I'm using the the slave configuration.

If I manually ssh to the windows machine I get the slave user (jslave) and everything works fine. I've tried both public key and password authentication with the slave and both fail. 

If I use Java Web Start to launch the slave everything works fine.

Privileged User: cyg_server
Slave User: jslave

Jenkins Server Version: 1.609.3 / CentOS 6
-- SSH Credentials Plugin v1.11
-- SSH Slaves plugin v1.10

Jenkins Slave Version: 2.52 / Windows 7

mkpasswd -c output
GOOD:
jslave:*:197611:197121:U-VMWS01S\jslave,S-1-5-21-2308987343-2122878688-780550161-1003:/home/jslave:/bin/bash

BAD:
cyg_server:*:197611:197121:U-VMWS01S\cyg_server,S-1-5-21-2308987343-2122878688-780550161-1003:/home/cyg_server:/bin/bash

Cheers,
Eric



Eric Blom

unread,
Dec 9, 2015, 10:13:53 PM12/9/15
to Jenkins Users
I think I've found the fix. By adding the LSA authentication package I seem to be getting the correct user. 

$ cyglsa-config

Warning: Registering the Cygwin LSA authentication package requires
administrator privileges!  You also have to reboot the machine to
activate the change.

Are you sure you want to continue? (yes/no) yes

Cygwin LSA authentication package registered.

Activating Cygwin's LSA authentication package requires to reboot.
Do you want to do this immediately? (yes/no) no
Reply all
Reply to author
Forward
0 new messages