cygwin 多使用者 /bin/bash: Operation not permitted

perfychi發表於2017-03-01
Apologies for spamming but I think this fix needs to be automated in 
ssh-host-config and updated in the cygwin FAQ. 
Like many users I've been struggling with this obscure bug that allows one 
to log on with ssh only as the priviledged user (cyg_server in my case). 
Attempts under another user succeed in all modes of authentication (password, 
RSA, DSA, whatever), but then get disconnected with the esoteric line: 

/bin/bash: Operation not permitted 

It turns out this has nothing to with bash, but rather with the usser 
cyg_server needing specific NTSEC rights to allow logons as other users. 

The fix was found here: 




Specifically, ssh-host-config needs these following lines: 
editrights -a SeAssignPrimaryTokenPrivilege -u cyg_server (cyg_server為服務啟動使用者)
editrights -a SeCreateTokenPrivilege -u cyg_server 
editrights -a SeTcbPrivilege -u cyg_server 
editrights -a SeServiceLogonRight -u cyg_server 


#editrights -l -u cyg_server 


然後重啟cygwin服務生效
Francis Korning de Grandpre 
enterprise software architect 
fkorning at yahoo dot ca 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27042095/viewspace-2134489/,如需轉載,請註明出處,否則將追究法律責任。

相關文章