samba
share a folder via SMB on CLI
Written by marcelpetrick on October 23, 2016
The missing counter-part for this post.
- create new smb-user pi: “
$ sudo smbpasswd -a pi
“ - create directory: “
$ mkdir freigabeATminipc
“ - set rights: “
$ sudo chmod 770 freigabeATminipc/
“ - edit config: “
$ sudo nano /etc/samba/smb.conf
”
add at end of the file the following and save-quit (CTRL+X; y)
1 2 3 4 5 6 7 |
[freigabeATminipc] comment = for sharing path = /home/pi/Desktop/freigabeATminipc valid users = pi browseable = yes read only = no guest ok = yes |
- restart: “
$ sudo service smbd restart
“ - check if everything fits: “
$ testparm
“
mount a smb-share (not via fstab!)
Written by marcelpetrick on October 7, 2016
Don’t know how often I did this on several systems and still always(!) have to pick the parameters.
1 2 3 |
$ sudo apt-fast install samba samba-common smbclient cifs-utils $ mkdir freigabeATminipc $ sudo mount -t cifs -o user=guest //MINIPC/freigabe freigabeATminipc/ |
Check for available shares in the network via “smbtree”.