LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   VPN Connected. Question about accessing shares via smbclient (https://www.linuxquestions.org/questions/linux-networking-3/vpn-connected-question-about-accessing-shares-via-smbclient-418943/)

tstein 02-23-2006 10:09 PM

VPN Connected. Question about accessing shares via smbclient
 
My work runs a Windows 2k3 server that provides VPN access. I'm having trouble accessing data on the server once I'm connected. In windows, I have NO problem accessing the data so I know that all my network paths are correct. NOTE that I am fully connected to the VPN...no problem. It's accessing stuff that I'm struggling with. I'll give my example using these generic examples:

VPN Server:
Server: vpn.work.com
User: domain\\myname
Pass: mypass

Note, all my examples will use masked data (fake IP's)

I connect just fine and when I run "tail /var/log/messages" I see this:

Code:

Feb 23 21:11:06 NETCFG pppd[6477]: CHAP authentication succeeded
Feb 23 21:11:06 NETCFG kernel: PPP MPPE Compression module registered
Feb 23 21:11:06 NETCFG pppd[6477]: MPPE 128-bit stateless compression enabled
Feb 23 21:11:07 NETCFG pppd[6477]: local  IP address 111.16.8.105
Feb 23 21:11:07 NETCFG pppd[6477]: remote IP address 111.16.8.100

ifconfig ppp0 looks like
Code:

ppp0      Link encap:Point-to-Point Protocol
          inet addr:111.16.8.105  P-t-P:111.16.8.100  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1396  Metric:1
          RX packets:85 errors:0 dropped:0 overruns:0 frame:0
          TX packets:120 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:11920 (11.6 Kb)  TX bytes:13069 (12.7 Kb)

"route" looks like:

Code:

root@NETCFG:~# route
Kernel IP routing table
Destination    Gateway        Genmask        Flags Metric Ref    Use Iface
111.16.8.100    *              255.255.255.255 UH    0      0        0 ppp0
localnet        *              255.255.255.0  U    0      0        0 eth0
loopback        *              255.0.0.0      U    0      0        0 lo
default        192.168.1.1    0.0.0.0        UG    1      0        0 eth0
root@NETCFG:~#

Now, in windows (after connecting to the VPN), I can access shares by typing the following directly into the my computer address line:

\\Computer1\folder1\
\\Computer2\folder2\

Usually, when I first access them, they ask for my user and password. Which is:
User: domain\\myname
Pass: mypass

So now, I try to basically do this in linux, so I type:
smbclient -L 111.16.8.100 -U domain\\myname%password

The output fromt this is:
Code:

Domain=[domain] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

        Sharename      Type      Comment
        ---------      ----      -------
        C$              Disk      Default share
        D$              Disk      Default share
        mspclnt        Disk
session request to 111.16.8.100 failed (Called name not present)
session request to 111 failed (Called name not present)
Domain=[domain] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

        Server              Comment
        ---------            -------
        RSDLAP1              RSD's Laptop
        RSDLAP34

        Workgroup            Master
        ---------            -------
root@NETCFG:~#

So what am I doing wrong here?

Thanks in advance for the help
Tomas

tstein 02-24-2006 01:15 PM

Any ideas? :(

redcane 03-13-2006 08:44 PM

When you say you can access shares in windows after connecting to the VPN, do you mean you are connecting to the VPN in windows, or are you connecting in linux, and connecting through the linux machine from a windows machine?

Can you ping 111.16.8.100 (the server)?
I can see you have a PPP link to 111.16.8.100, but is this the computer the shares are on? In windows, see if you can do an "nslookup computer1" and see it's IP, perhaps check computer2's IP as well.
You will probably find 111.16.8.100 is a network gateway, not the whole network. You will need to set up routing to allow your machine to find the rest of the network.

jiml8 03-13-2006 10:12 PM

I am not sure why you get the error messages about Called Name not present; looks to me like a misconfiguration on the server.

You did get what you asked for with the smbclient -L. You were simply asking what services were present on the server, and obviously your authentication was accepted and you were told what services are present.

If you want to connect to a share and do something, you need to use smbclient to connect. I'm not going to fool with your munged IP; your routing table makes it clear it is a 192.168.1 range, and exposing that information makes no difference anyway.

In any case, this command

smbclient //192.168.1.100/C$ -U domain//myname%pass

should set you right up, connecting with the C drive and giving you the smb> prompt.

If you want to browse a share graphically with a file manager on your linux box, you'll need to first establish a mountpoint for the share, then mount it with smbmount. Then you can browse it with konqueror, or whatever, exactly as if you were working on a Windows machine, or as if you were browsing a local share in an X session.

yoron 03-27-2006 06:58 AM

Sorry to burst in but...

Hi jiml8, can you stommach one more Q ?
I'm using Slackware 10.2 and have made a working (so far)
PDC with static ip adresses that connects my W_2000 workstations 'on the fly', i'm using 'user' mode. Now i would like to put Slacware on the slower Working stations.

The Samba client is an inbuilt function in the Samba server, right.
So i install Sambaserver on the Slackware_clients.
But what syntax should i use for the samba config on those W_stations.
Or... am i wandering in the woods again ?

What's getting me somewhat confused is that some Distros seem to have both
SambaServer and SambaClient as two different Installations/applications...
;)
Regards. Yoron


All times are GMT -5. The time now is 10:33 AM.