# [SOLVED] Help with mounting/browsing a network share

## AaylaSecura

Hello everyone! I need some help accessing files on a network share I connect to via VPN. It's on my university's network and all I know about it is that it supports PPTP connection only. I emerged net-dialup/pptpclient entered the required credentials in /etc/ppp/chap-secrets and /etc/ppp/peers/rhul_vpn and ran

```
pon rhul_vpn
```

ifconfig gives:

```
ppp0      Link encap:Point-to-Point Protocol  

          inet addr:134.219.176.77  P-t-P:134.219.176.50  Mask:255.255.255.255

          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1396  Metric:1

          RX packets:8 errors:0 dropped:0 overruns:0 frame:0

          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:3 

          RX bytes:80 (80.0 B)  TX bytes:80 (80.0 B)
```

I assume everything is ok so far. I added:

```
route add -net 134.219.176.0 netmask 255.255.255.0 dev ppp0
```

I need to mount it so I can access the files and this is where I get stuck. The address of the share is smb://mydata.rhul.ac.uk/home

I tried:

```
mount -t cifs //mydata.rhul.ac.uk/home /mnt/rhul_mydata -o username=<domain\\username>,password=<pass> -v
```

and it gives:

```
mount.cifs kernel mount options: unc=//mydata.rhul.ac.uk\home,domain=CC,ver=1,username=<username>,,,,ip=134.219.205.86,pass=********

mount error(115): Operation now in progress

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
```

I tried emerging net-fs/samba and net-fs/smbnetfs. I have fuse support built into the kernel and it is loaded at boot. I followed the guide from the Arch wiki and added user_allow_other to /etc/fuse.conf, copied the provided example smb.conf and smbnetfs.conf to their places (/etc/samba/smb.conf /root/.smb/smb.conf /root/.smb/smbnetfs.conf) and added the login info to smbnetfs.conf:

```
auth         vpn.rhul.ac.uk CC\\<username> "<password>"
```

According to the guide all I had to do is start the smbnetfs daemon and all the shares specified in smbnetfs.conf should be mounted in /mnt/smbnet (I didn't have the folder so I created it). When I ran smbnetfs to start it I got:

```
fuse: missing mountpoint parameter
```

I don't know if my aproach is correct at all or there is another way to access the files. Can anyone help?

Update: I also tried browsing the files using smbclient:

```
smbclient //mydata.rhul.ac.uk/home -U <domain>\\<usernam>
```

It gives:

```
Connection to mydata.rhul.ac.uk failed (Error NT_STATUS_UNSUCCESSFUL)
```

Last edited by AaylaSecura on Thu Jun 28, 2012 8:13 am; edited 1 time in total

----------

## Rexilion

 *AaylaSecura wrote:*   

> Update: I also tried browsing the files using smbclient:
> 
> ```
> smbclient //mydata.rhul.ac.uk/home -U <domain>\\<usernam>
> ```
> ...

 

Just for analysis, let's see if creating a connection works. Could you please post the output of the following command?

 *Quote:*   

> $ smbclient -L mydata.rhul.ac.uk -N

 

----------

## AaylaSecura

 *Rexilion wrote:*   

>  *AaylaSecura wrote:*   Update: I also tried browsing the files using smbclient:
> 
> ```
> smbclient //mydata.rhul.ac.uk/home -U <domain>\\<usernam>
> ```
> ...

 

Hi and thanks for replying! The above command results in the same error:

 *Quote:*   

> Connection to mydata.rhul.ac.uk failed (Error NT_STATUS_UNSUCCESSFUL)

 Last edited by AaylaSecura on Mon Jun 11, 2012 7:50 pm; edited 1 time in total

----------

## AaylaSecura

UPDATE: I decided to use the IP given by ifconfig in place of mydata.rhul.ac.uk, so I ran:

```
smbclient -L 134.219.176.50 -N
```

and I was able to connect! Although it returned an error as well:

 *Quote:*   

> Anonymous login successful
> 
> Domain=[CC] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]
> 
> 	Sharename       Type      Comment
> ...

 

It denied access, cause I didn't provide a username, but when I tried to login with my username:

```
smbclient -L 134.219.176.50 -U CC\\<username>
```

it returned:

 *Quote:*   

> Domain=[CC] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]
> 
> 	Sharename       Type      Comment
> 
> 	---------       ----      -------
> ...

 

I do not know what the bolded lines are supposed to mean, but it seems that the home share is not present at all... And it must be, because I can browse this same address smb://mydata.rhul.ac.uk/home from Windows after establishing the VPN connection...

I tried browsing one of the listed shares, namely logs and it was a success - it presented me with the smb: \> prompt

I just figured out that this IP address is not the one for mydata.rhul.ac.uk, rather it's the VPN server's IP address (silly me). I used avahi to resolve mydata.rhul.ac.uk into an IP address it gave 134.219.205.86. I ran:

```
smbclient -L 134.219.205.86 -U CC\\<username>
```

but it returned the old familiar error:

 *Quote:*   

> Connection to 134.219.205.86 failed (Error NT_STATUS_UNSUCCESSFUL)

 

----------

## cwr

I find (the command line) smbtree sometimes useful for discovering

what Samba can access and what it can't.  After that it's a question

of updating the configuration on  one end or the other.

Will

----------

## AaylaSecura

 *cwr wrote:*   

> I find (the command line) smbtree sometimes useful for discovering
> 
> what Samba can access and what it can't.  After that it's a question
> 
> of updating the configuration on  one end or the other.
> ...

 

Hi, thanks for trying to help! smbtree -N returns:

 *Quote:*   

> MYGROUP
> 
> 	\\ALEKSANDRINA   		Samba Server
> 
> 		\\ALEKSANDRINA\IPC$           	IPC Service (Samba Server)

 

This is my workgroup as defined in /etc/samba/smb.conf. I do not know a thing about networking, I have no idea what options to include in smb.conf and possibly /etc/hosts...

----------

## cwr

OK,  it can see the system ALEKSANDRINA, but ALEXSANDRINA isn't

exposing anything to share but $IPC, which isn't much use.  You need

to check smb.conf on ALEXANDRINA, and export whichever directories

you want to share.  (The smb.conf.example (??) file is pretty helpful.

Will

----------

## AaylaSecura

 *cwr wrote:*   

> OK,  it can see the system ALEKSANDRINA, but ALEXSANDRINA isn't
> 
> exposing anything to share but $IPC, which isn't much use.  You need
> 
> to check smb.conf on ALEXANDRINA, and export whichever directories
> ...

 

Hi Will, thanks for your reply. I might be misunderstanding something, but ALEKSANDRINA is my own computer, the network I am trying to connect to is my university's, whose name I am not sure of (the domain name is CC and I think the server's netbios name is MYDATA). I am connected to it via PPTP VPN, but samba does not see it :-/ Any suggestions?

----------

## cwr

Ok, Samba is working your end (you can see the stuff _you_ are exporting).

It isn't working the university end - apparently the university isn't runnning

a recognisable Samba server, which suprises me since you've had responses

from smbclient.  I think you'll have to talk to the university to see just what

they are doing.

Good luck - Will

----------

## AaylaSecura

 *cwr wrote:*   

> Ok, Samba is working your end (you can see the stuff _you_ are exporting).
> 
> It isn't working the university end - apparently the university isn't runnning
> 
> a recognisable Samba server, which suprises me since you've had responses
> ...

 

I will do that  :Smile:  Thank you!

----------

## AaylaSecura

A person from my University was able to solve the issue: it turned out that I hadn't added a correct route after establishing the VPN connection and samba could not use the ppp0 network interface and the IP assigned to me by it. All I had to do was:

```
route add -net 134.219.0.0 netmask 255.255.0.0 dev ppp0
```

instead and now I am able to browse and mount this share  :Smile: 

----------

