Stargate Logo  Secured by phpPhobos

Smurphtools   
  Login  - No Account?  Create One   
Search 
Wednesday, 11 December 2019  -
News FeedRSS Feed
rss rdf  
  Home 
  Authentication 
 Documentation 
    Site Documentation 
    About me 
  Legal Notice 
 Applications 
    Web Links 
 RC Models 
    RC Models 
    RC Batteries 
 Modules 
    Downloads 
    Weblinks 
 Blacklists 
    Blacklist 
    Blockout 
    DNS Blacklist 
 Registered Bloggers 
  Blog de Maiwenn 
  Blog de Morgane 
  Joerg's Blog 
 Gallery [Listing]
  > Diving 
  > Martinique 
  > Steampunk 
  > RC Planes 
  > FPV Drones 
  > Indy travels 
  > Budapest 
 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 
 System Stats [ Index ]
 Router
  > Gateway 
 Server
  > Stargate 
  > Halley 
 Client
  > RemPi 
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: 76505
  Back Back  
 
Problems to  root(-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+