[Samba] [firstname.lastname@example.org: Re: Accessing network shares under sshd]
cae at bklyn.org
Tue Dec 3 19:12:00 GMT 2002
Hi. I'm having trouble mapping network drives from a Samba
server when I login to my machine using the Cygwin SSH daemon
and am hoping it may be something people here have seen
I am able to map Samba shares with no problem from the Windows
Explorer, or a Cygwin bash shell started from my desktop, but
when I login remotely via ssh and try and mount something with
"NET USE", I end up getting the error message:
System error 5 has occurred.
Access is denied.
I think I have traced the problem to the fact that "NET USE"
is not passing along the correct credentials to the Samba
server, even if I pass it the /USER:username argument:
NET USE S: '\\server\share' password /USER:user
(single quotes to keep the backslashes from being treated as
escape chars by cygwin bash.exe). I am guessing the root of
the problem is the SSH service being run as the "Local System"
account and some permissioning on the XP side, but I'm not
sure what to do about it.
Client = Windows XP SP1, Cygwin 1.3.13(0.62/3/2), OpenSSH 3.4p1
Server = Debian unstable, Samba version "2.999+3.0.alpha20-4"
Any help appreciated, forwarded message including some Samba
log info is below.
----- Forwarded message from Caleb Epstein <cae at bklyn.org> -----
Date: Tue, 3 Dec 2002 13:49:06 -0500
From: Caleb Epstein <cae at bklyn.org>
Subject: Re: Accessing network shares under sshd
To: ssh-l at erdelynet.com
On Tue, Dec 03, 2002 at 11:49:21AM -0500, Ben Voigt wrote:
> Can you open a cmd.exe session from within ssh? (Works not so well,
> but you should be able to determine whether you can access the
> mapped drives.) If so, you can use the cygwin mount command to
Nope, I get the same old errors - "net use" shows any mapped
drives to be "Unavailable" and I get an "Access denied" error
if I try to map a new drive.
> create mount points now that the drive letters are mapped. (You
> probably don't need a Windows drive letter for cygwin to create a
> mount point; you do need the net use /user command to set the right
I've managed to get a little further on this by enablign some
debugging messages on the server side, which is Samba. I
probably should have mentioned this before as it mayh ave some
bearing on the problem.
Anyway, I found that when I try to mapa network drive under
ssh, even if I use the /USER: flag on "net use", the
credentials thet get passed along to Samba are not carrying
any user name. Here's some of the log:
A failed connection:
[2002/12/03 13:36:01, 3] smbd/sesssetup.c:reply_spnego_auth(420)
Got user= workgroup= machine=[HAGRID] len1=1 len2=0
[2002/12/03 13:36:01, 3] auth/auth.c:check_ntlm_password(191)
check_password: Checking password for unmapped user \@[HAGRID] with the new password interface
[2002/12/03 13:36:01, 3] auth/auth.c:check_ntlm_password(194)
check_password: mapped user is: [BKLYN]\@[HAGRID]
A successful connection I make from Windows Explorer "map network drive":
[2002/12/03 13:32:11, 3] smbd/sesssetup.c:reply_spnego_auth(420)
Got user=[cae] workgroup=[HAGRID] machine=[HAGRID] len1=24 len2=24
[2002/12/03 13:32:11, 3] auth/auth.c:check_ntlm_password(191)
check_password: Checking password for unmapped user [HAGRID]\[cae]@[HAGRID] with the new password interface
[2002/12/03 13:32:11, 3] auth/auth.c:check_ntlm_password(194)
check_password: mapped user is: [BKLYN]\[cae]@[HAGRID]
Now to figure out why the credentials are't right...
Caleb Epstein | bklyn . org |
cae at | Brooklyn Dust | For fast-acting relief, try slowing down.
bklyn dot org | Bunny Mfg. |
----- End forwarded message -----
Caleb Epstein | bklyn . org | Death has been proven to be 99% fatal in
cae at | Brooklyn Dust | laboratory rats.
bklyn dot org | Bunny Mfg. |
More information about the samba