Samba from Linux

Reaching Windows's samba share from Linux

Installation

apt install -y smbclient

Credential file

.smbcredentialsWork

username=admin.rga
password=MyVeryUnsecretPassword
domain=company.com

Mount smb share

/etc/fstab

//data.company.com/staff/admin.rga          /mnt/staff          cifs    credentials=/home/rga/.smbcredentialsWork,uid=1000 0 0

smbclient

List share

smbclient -A ~/.smbcredentialsWork -L dc01.prod.company.com

CLI Browser

smbclient -A ~/.smbcredentialsWork //dc01.prod.company.com/c$

? is help

smb: \> ?
?              allinfo        altname        archive        backup         
blocksize      cancel         case_sensitive cd             chmod          
chown          close          del            dir            du             
echo           exit           get            getfacl        geteas         
hardlink       help           history        iosize         lcd            
link           lock           lowercase      ls             l              
mask           md             mget           mkdir          more           
mput           newer          notify         open           posix          
posix_encrypt  posix_open     posix_mkdir    posix_rmdir    posix_unlink   
print          prompt         put            pwd            q              
queue          quit           readlink       rd             recurse        
reget          rename         reput          rm             rmdir          
showacls       setea          setmode        scopy          stat           
symlink        tar            tarmode        timeout        translate      
unlock         volume         vuid           wdel           logon          
listconnect    showconnect    tcon           tdis           tid            
logoff         ..             !

Ctrl-D is exit