Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Help with mounting/browsing a network share
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Sat Jun 09, 2012 9:10 pm    Post subject: [SOLVED] Help with mounting/browsing a network share Reply with quote

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
Code:
pon rhul_vpn

ifconfig gives:
Code:
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:
Code:
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:
Code:
mount -t cifs //mydata.rhul.ac.uk/home /mnt/rhul_mydata -o username=<domain\\username>,password=<pass> -v

and it gives:
Code:
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:
Code:
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:
Code:
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:
Code:
smbclient //mydata.rhul.ac.uk/home -U <domain>\\<usernam>

It gives:
Code:
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
Back to top
View user's profile Send private message
Rexilion
Veteran
Veteran


Joined: 17 Mar 2009
Posts: 1044

PostPosted: Mon Jun 11, 2012 9:16 am    Post subject: Re: Help with mounting/browsing a network share Reply with quote

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

It gives:
Code:
Connection to mydata.rhul.ac.uk failed (Error NT_STATUS_UNSUCCESSFUL)


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

_________________
fs/super.c: "Self-destruct in 5 seconds. Have a nice day...\n"
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Mon Jun 11, 2012 4:47 pm    Post subject: Re: Help with mounting/browsing a network share Reply with quote

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

It gives:
Code:
Connection to mydata.rhul.ac.uk failed (Error NT_STATUS_UNSUCCESSFUL)


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


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
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Mon Jun 11, 2012 7:48 pm    Post subject: Reply with quote

UPDATE: I decided to use the IP given by ifconfig in place of mydata.rhul.ac.uk, so I ran:
Code:
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
--------- ---- -------
Error returning browse list: NT_STATUS_ACCESS_DENIED
session request to 134.219.176.50 failed (Called name not present)
session request to 134 failed (Called name not present)

Anonymous login successful
Domain=[CC] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]

Server Comment
--------- -------
...... a looong list of netbios (I suppose) names including MYDATA

It denied access, cause I didn't provide a username, but when I tried to login with my username:
Code:
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
--------- ---- -------
C$ Disk Default share
Logs Disk
N$ Disk Default share
IPC$ IPC Remote IPC
ADMIN$ Disk Remote Admin
D$ Disk Default share
session request to 134.219.176.50 failed (Called name not present)
session request to 134 failed (Called name not present)

Domain=[CC] OS=[Windows Server 2003 3790 Service Pack 2] Server=[Windows Server 2003 5.2]

Server 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:
Code:
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)
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue Jun 12, 2012 11:46 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Tue Jun 12, 2012 7:07 pm    Post subject: Reply with quote

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.

Will

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...
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sat Jun 16, 2012 9:44 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Sat Jun 16, 2012 10:12 am    Post subject: Reply with quote

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
you want to share. (The smb.conf.example (??) file is pretty helpful.

Will


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?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun Jun 17, 2012 2:10 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Sun Jun 17, 2012 2:24 pm    Post subject: Reply with quote

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
from smbclient. I think you'll have to talk to the university to see just what
they are doing.

Good luck - Will


I will do that :) Thank you!
Back to top
View user's profile Send private message
AaylaSecura
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jun 2011
Posts: 122

PostPosted: Thu Jun 28, 2012 8:15 am    Post subject: Reply with quote

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:
Code:
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 :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum