# HG changeset patch # User Oleksandr Gavenko # Date 1427794670 -10800 # Node ID 57cb0966464c3b0a728449aa197a96d9f81cea66 # Parent a85cc266dbdfa08c22c2eb5275ad485484ef45ea Recursively getting files. diff -r a85cc266dbdf -r 57cb0966464c mount-smbfs.rst --- a/mount-smbfs.rst Tue Mar 24 17:23:15 2015 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ --*- mode: outline; coding: utf-8 -*- - -* Debian - -Install smbfs package: - - $ apt-get install smbfs - -Create new group: - - $ groupadd smbgrp - -Add permitions for user that may used mount point: - - $ useradd me smbgrp - $ useradd you smbgrp - -Make password file: - - $ cat >/etc/.smbpass - username= - password= - domain= - ^D - -Make mount point: - - $ mkdir /mnt/smb - $ chgrp smbgrp /mnt/smb - $ chmod 770 /mnt/smb - -Add this line to /etc/fstab - - XXX correct uid=root,gid=smbgrp,umode=775,fmask=775 - //192.168.xx.xx/share-point /mnt/smb smbfs rw,credentials=/etc/.smbpass,uid=root,gid=smbgrp,umode=775,fmask=775 - -* FreeBSD - -* Solaris diff -r a85cc266dbdf -r 57cb0966464c samba.rst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/samba.rst Tue Mar 31 12:37:50 2015 +0300 @@ -0,0 +1,71 @@ +.. -*- coding: utf-8 -*- + +======== + Samba. +======== +.. contents:: + +Installing smbfs. +================= + +Install smbfs package:: + + $ apt-get install smbfs + +Create new group:: + + $ groupadd smbgrp + +Add permitions for user that may used mount point:: + + $ useradd me smbgrp + $ useradd you smbgrp + +Make password file:: + + $ cat >/etc/.smbpass + username= + password= + domain= + ^D + +Make mount point:: + + $ mkdir /mnt/smb + $ chgrp smbgrp /mnt/smb + $ chmod 770 /mnt/smb + +Add this line to ``/etc/fstab``:: + + XXX correct uid=root,gid=smbgrp,umode=775,fmask=775 + //192.168.xx.xx/share-point /mnt/smb smbfs rw,credentials=/etc/.smbpass,uid=root,gid=smbgrp,umode=775,fmask=775 + +Recursively getting files. +========================== + +You can use ``TAB``completion in ``smbclient``:: + + $ mkdir $DEST + $ cd $DEST + $ smbclient -U $DOMAIN/$DOMAINUSER //$IP/$SHARE $DOMAINPASSWORD + smb> prompt + smb> recurse + smb> mget directory\ + ... + smb> quit + +Alternative syntax to run ````:: + + $ smbclient -U $USER //$IP/$SHARE $PASSWORD + ... + +or:: + + $ smbclient -U $USER //$IP/$SHARE + Password: + ... + +To list all available shares:: + + $ smbclient -U $USER -L //$IP +