[SOLVED] Network HD help

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read this

[SOLVED] Network HD help

Postby synurj3 on Sat Jul 25, 2009 11:23 pm

I have a Lacie NAS device, and essentially what I am wanting to do is when a user logs onto their session, I need it to auto mount a share off the network device. Is this possible?

User A: logs on mounts for instance 10.0.0.2/user_a on ~usera/private
same for other users, with applicable changes...

any help would be appreciated
Last edited by synurj3 on Sun Jul 26, 2009 1:27 pm, edited 1 time in total.
synurj3
Level 1
Level 1
 
Posts: 2
Joined: Sat Jul 25, 2009 11:02 pm

Linux Mint is funded by ads and donations.
 

Re: Network HD help

Postby altair4 on Sun Jul 26, 2009 10:42 am

The classic way of doing this is to create an entry in fstab that will mount the share at boot. But this has a lot
of problems related to when the actual mounting takes place and whether you remember to turn on the NAS device before
you boot the pc and if you have wireless. So I'm going to offer you a completely unique ( to me ) approach:

This is where I found this technique:
http://ubuntuforums.org/showthread.php?t=1186877

My synopsis of the procedure:

The act of opening nautilus > Network > Windows Network > Workgroup > share
can be done from the command line:

Open Terminal
Type gvfs-mount smb://NAS_ip_address/share_name
For example: gvfs-mount smb://10.0.0.2/user_a

The share should show up under "Places" in Nautilus and more importantly has an actual mountpoint at /home/userid/.gvfs

Next, create a script with that same command and put it in your Autostart Folder:

Open gedit
Enter the following:


Save it to /home/userid/nasmount.sh
Make it executable: chmod +x /home/userid/nasmount.sh

Go to Menu > Preferences > Startup Applications > Add > point it to your nasmount.sh file.

The author also describes how to create the username / password entry using Gnome keyring so the user is not prompted for it.

I think it's kind of clever but I tend to like unconventional approaches :)
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.
altair4
Level 16
Level 16
 
Posts: 6124
Joined: Tue Feb 03, 2009 10:27 am

[SOLVED] Network HD help

Postby synurj3 on Sun Jul 26, 2009 1:26 pm

Thanks, worked great
synurj3
Level 1
Level 1
 
Posts: 2
Joined: Sat Jul 25, 2009 11:02 pm


Return to Other networking topics

Who is online

Users browsing this forum: No registered users and 6 guests