User Tools

Site Tools


raspberrypi:samba

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
raspberrypi:samba [2014/12/24 10:42] – external edit 127.0.0.1raspberrypi:samba [2018/03/18 19:26] (current) – removed rlunaro
Line 1: Line 1:
-====== Install samba in the raspberry pi ====== 
- 
-The problems I've run into are because **you have to install two packages, not only one**:  
- 
-<code> 
-sudo apt-get install samba 
-sudo apt-get install samba-common-bin 
-</code> 
- 
-**Note:** if you don't install the later package ''samba-common-bin'' you won't find the program smbpasswd which is critical to create a user. Ok, if you want to have all the files open to the public, it might won't be neccesary. 
- 
-After this, modify the ''/etc/samba/smb.conf'' file to include your own share:  
- 
-<code> 
-[workspace] 
-        path = /home/rluna/workspace 
-        read only = no 
-        writeable = yes 
-;       browseable = yes 
-        valid users = rluna 
- 
-</code> 
- 
-Then, create a user:  
- 
-<code> 
-smbpasswd -a PUT-YOUR-USERNAME-HERE 
-</code> 
- 
-Restart the service:  
- 
-<code> 
-# /etc/init.d/samba/restart 
-</code> 
- 
-And you are ready to mount from another machine:  
- 
-<code> 
-sudo mount -t cifs //192.168.1.4/workspace /mnt -o user=REMOTE-USERNAME-GOES-HERE,uid=LOCAL-OWNER-OF-FILES,gid=LOCAL-GROUP-OF-FILES 
-</code> 
- 
-===== Some advices to install in a permanent mount point ===== 
- 
-Edit your fstab file and add the following: 
- 
-<code> 
-//192.168.1.4/workspace /your/local/dir   cifs     credentials=/some/secret/file/.rasp_creds,_netdev,uid=LOCAL-USER-FOR-FILES,gid=LOCAL-GROUP-FOR-FILES    0 
-</code> 
- 
-The file ''.rasp_creds'' must have the following: 
- 
-<code> 
-# 
-# credentials for the raspberry pi shared server 
-# 
-user=REMOTE-USERNAME 
-password=REMOTE-PASSWORD-YOU-SET-WITH-SMBPASS 
-</code> 
- 
- 
-~~DISQUS~~ 
- 
  
raspberrypi/samba.1419414128.txt.gz · Last modified: 2022/12/02 22:02 (external edit)