Andries filmer

Feel free with Open Source Software

Andries Filmer - Internet professional sinds 1996.
Ik ben groot voorstander van Free- en Opensource Software (FOSS) en laat deze site jouw overtuigen waarom dit goed is.
Home Over deze website Kennisbank Ezelsoren Freelancer Online gereedschap

CIFS (SMB) mounts to samba server


If you need/want a automatic mount on your linux workspace with a samba server

You need smbfs

 apt-get install smbfs

From Ubuntu Lucid Lynx (10.04) need to set uid for mount.cifs.

 sudo chmod +s `which mount.cifs`
 sudo chmod +s `which umount.cifs`

Make a directorie in your homedir. This wil be your CIFS mount point.

 cd ~
 mkdir servername 
 mkdir servername/yourmountdir
 mkdir scripts
 vi scripts/cifsmount

 -- begin cifsmount file --
 # all on one line
 #
 mount.cifs //servername/yourmountdir $HOME/servername/yourmountdir 
  -ocredentials=$HOME/scripts/.smbcredentials,owner,uid=$USERNAME,gid=$USERNA-ME
 -- end cifsmount file --

 chmod +x scripts/cifsmount

Make a file with samba credentials

 vi scripts/.smbcredentials

 -- begin scripts/.smbcredentials file --
 username=[username]
 password=[password]
 -- end scripts/.smbcredentials file --

 chmod 600 scripts/.smbcredentials

We want to run this every time we start a gnome-session. Goto System > Preferences > Sessions, and click on tab 'Startup Programs' adn on 'Add'.

 Name: cifsmount
 Command: /home/[username]/scripts/cifsmount

And click OK.

From now on "servername/yourmountdir" wil be mounted automaticly when you logon.

This page is created on 2008-06-29 and updated on 2010-04-29

I appreciate if you give some comment about this page. Please go ahead.
Your e-mailaddress will not be published it is only to contact you (if needed).

 
Your name
Your e-mailaddress
To prefent robots to use this form I ask you kindly to type the next characters in the input field.
 

 


Mijn Curriculum vitae | De content op deze website heeft de Creativecommons 3.0 licentie | © 2011
Andries Filmer | http://andries.filmer.nl | andries@filmer.nl | © 2011
Deze website wordt gerealiseerd met Free- en Open Source Software: | | | | | |