Terminus Logo  Secured by phpPhobos

Shadow Family   
  Login  - No Account?  Create One   
Search 
Friday, 26 April 2024  -
News FeedRSS Feed
rss rdf  
  Home 
  Authentication 
 Documentation 
    Site Documentation 
    About me 
  Legal Notice 
 Applications 
    Web Links 
 Hobbies 
    RC Models 
    RC Batteries 
    Build blogs 
 Modules 
    Downloads 
    Weblinks 
 Blacklists 
    Blacklist 
    Blockout 
    DNS Blacklist 
 Registered Bloggers 
  Joerg's Blog 
 Gallery [Listing]
  > Diving 
  > Steampunk 
  > RC Planes 
  > FPV Drones 
  > Indy travels 
 FAQ  [ Topics  ]
 Common Linux problem... 
 Routerboard RBxxxAH 
 Apple Mac-mini 
 PHP Phobos 
 Stargate's Backup sc... 
 eBook Reader / PRS-5... 
 RC Models 
 Server in SolLan 
Question ? How can I mount a SMB share under linux ?   [
View DetailsView details
|
Print ViewPrint view
]

 Sometimes, on old systems, we need to mount a samba-share.
Create a file: /etc/cifs.pwd with

~#touch /etc/cifs.pwd
~#chmod 600 /etc/cifs.pwd

And add in that file the login/password file. Content Format is very simple - as follow:

username=smbuser
password=smbpassword

Password/username is in cleartext !

After that - you can mount the share as root with:

~#mount -t smbfs -o credentials=/etc/cifs.pwd  //REMHOSTIP/remotedir /localdir

In this example, /remotedir is the remote Directory/Share and /localdir is the local Directory you mount it in on your local file system. This localdir needs to exist on you local machine.

Example:
Assume the Samba Host is: 192.168.101.56
Remote Share is: /smbtmp
Local mount Directory is: /mnt/smbtmp

We would have:

~#mount -t smbfs -o credentials=/etc/cifs.pwd //192.168.101.56/smbtmp /smb/smbtmp

To make it easy - you add the data to the /etc/fstab file.

//192.168.101.56/smbtmp /mnt/smbtmp smbfs credentials=/etc/cifs.pwd

With this, a simple: "~#mount /mnt/smbtmp" is be enough to mount the samba share.  

Entered by smurphy on Tuesday, 16 November 2010 @ 11:08:52  
Linux General - Common Linux problems, # Hits: 88477
  Back Back  
 
Problems to  webmaster(-AT-)solsys(-DOT-)org  - best viewed @ 1920bpp
This site is powered by phpPhobos v2.0b446
© J. Mertin smurphy(-AT-)solsys(-DOT-)org 
Icons - Copyright Breeze artists GPL 2+