The first thing I did is add a user to samba. In order to add a user to samba you should first add the user for the server itself. So type
sudo useradd johnnow you can add user "john" to samba
sudo smbpasswd -a johnthe "-a" parameter means add user. To delete the user type:
sudo smbpasswd -x johnNow that we added the user the only thing left is configure samba. Type:
sudo vi /etc/samba/smb.confwith editing the existing configuration-file I did not get it working. So decided to start with an empty file and build it from scratch. With some help of examples on the net I ended up with this:
This did the trick for me. Now I am able to access the directory "/mnt/music". The only problem I encountered that, although browsable is set to "yes", I was not able to write to this location from my windows client. I found out that this had to do with the permission settings in Unix. You can change these permissions with the command CHMOD. I typed
[global]
workgroup = MSHOME
server string = %h
security = user
printable = no
read only = no
[homes]
browseable = no
writable = yes
[music]
path = /mnt/music
writable = yes
browsable = yes
sudo chmod a=rwx /mnt/music/now the directory is readable(r), writable(w) and executable(x) for everyone(a). Check here for a very clear tut on the CHMOD command. To start, stop, restart samba type:
sudo /etc/init.d/samba start
sudo /etc/init.d/samba stop
sudo /etc/init.d/samba restart
Next post will be about connecting remotely to the server with "ssh". After that I will post about setting up a DAAP server to serve music to I-tunes with the "(open) digital Audio Access Protocol".
No comments:
Post a Comment