Samba - mounting share from linux

From thelinuxwiki
Revision as of 16:30, 12 April 2013 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Listing samba / cifs shares on a host

smbclient --list=192.168.167.8

Mount command syntax

newer mount command (smbfs depricated)

mount -t cifs //server/E$ /mnt/test -o username=gagazote/mydomain,password=hackth1s

required package for cifs file type on debian: cifs-utils

sudo apt-get install cifs-utils

This might require the mount-cifs package


old mount command

mount -t smbfs //servername/sharename /mountdirectory -o username=mywindowsusername,password=mywindowspassword


samba users

/etc/samba/smb.conf Uncomment the security line *** this will require a local user account for each smbuser ***

security = user
username map = /etc/samba/smbusers

make local user account, no hoee dir or local passwd needs to be set

useradd smbuser

add user to /etc/samba/smbusers

<localusername> = “<samba username>”.

example

smbuser = smbuser