|
|
View previous topic
::
View next topic
|
Author |
Message |
ramon fincken Site's programmer
 Get a free globally recognized avatar It's free!
Joined: 03 Aug 2007 Posts: 412 Location: A'dam/Diemen, The Netherlands
|
Posted: Sat Dec 19, 2009 6:49 pm Post subject: [solution] Ubuntu: automatically connect and mount to windows shares |
|
|
Tutorial to auto mount any share, applied to Windows share.
This example will auto mount
//Windows_server_name/video_dir to my Ubunutu upon login at /mnt/videos
You may need to install Samba, smbfs and /or CIFS first:
https://help.ubuntu.com/community/Mount...ermanently
Code: | sudo apt-get install smbfs
sudo update-rc.d -f umountnfs.sh remove
sudo update-rc.d umountnfs.sh stop 15 0 6 . |
- Make a Mount directory first
In order to have a share mounted automatically every time you reboot, you need to do the following:
Open a shell as root
Create a file containing your Windows/Samba user account details:
Code: | gedit /home/yourubuntuusername/.sambaautologin |
/home/yourubuntuusername is of course your own home folder containing your name
...it should contain two lines as follows:
Code: | username=share_username
password=share_password |
Optional: Change the permissions on the file for security:
Code: | chmod 0600 /home/yourubuntuusername/.sambaautologin |
Now create a directory where you want to mount your share (e.g. /mnt/videos):
Now edit the file system table (/etc/fstab) and add a line as follows: ( Make a backup first )
Code: | //Windows_server_name/video_dir /mnt/videos smbfs credentials=/home/yourubuntuusername/.sambaautologin,rw,uid=bob 0 0 |
...where 'bob' is the non-root user you log into ubuntu with, 'Windows_server_name' is the name or address of the Windows machine and 'video_dir' is the name of the share. So if your Ubuntu login name = pete >
Code: | //Windows_server_name/video_dir /mnt/video smbfs credentials=/home/yourubuntuusername/.sambaautologin,rw,uid=pete 0 0 |
To mount the share now, just use the following command as root. It will mount automatically on subsequent reboots.
Not working? Try to rewrite Code: | //Windows_server_name/video_dir | as: Code: | //[ip_adres_of_windows_server]/video_dir |
and try to mount again.
Solution about this hosts/ip problem: http://www.linuxquestions.org/questions...nt-437901/
Partially rewritten from:
https://help.ubuntu.com/community/SettingUpSamba
Read on:
http://www.arsgeek.com/2006/09/25/ubunt...dwritable/
http://www.cyberciti.biz/tips/how-to-mo...linux.html |
|
Back to top |
|
 |
Google adsense Advertisement
|
Posted: Sat Dec 19, 2009 6:49 pm Post subject: [solution] Ubuntu: automatically connect and mount to windows shares |
|
|
Advertisement
|
|
Back to top |
|
 |
GravityForms Advertisement
|
Posted: Sat Dec 19, 2009 6:49 pm Post subject: [solution] Ubuntu: automatically connect and mount to windows shares |
|
|
Advertisement
 |
|
Back to top |
|
 |
|
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
|
|
|
|