This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Solution to a problem of accessing remote file shares when logged in via ssh


I found a solution to a ssh/cygwin and file sharing (smb/samba)
problem which had been bothering me for quite a while.  I looked at
the FAQ and did some google searches and see where others have
reported a similar problem in the mailing list archive but didn't
see the solution I came across being reported.

My problem was that I am using a persistent file share directory
created using the command on machine A running Windows 2K and has
cygwin installed:

 mount -f -s -b -E "//MachineB/dirName" "/dirName"

and if I was using Machine A I could do a "cd /dirName" and
it worked fine, but if I tried to ssh into Machine A and then
do a "cd /dirName" I got a permission denied error.

Previous suggestions in the mailing list for similar problems (related
to "net use") were that it may be related to the setting of the CYGWIN
environment variable by setting or unsetting either nosmbntsec or
smbntsec values for it.  However that didn't change anything for me.

What finally worked for me was to go to 

 Settings -> Control Panel -> Administrative Tools -> Services

and to change the LogOn userid for the "CYGWIN sshd" service from
"Local System account" to a particular user on my domain.  Now things
work OK for me if I ssh in and want to access remote file shares. 

This may not be the right solution for all situations, ie. if you have
multiple people logging in to a machine via cygwin/ssh and they all
need to get their own privileges, but it works for my needs as I just
need one account one this machine and I'm the only one who uses it.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]