Single-user:
In the simplest setup, use your usual Ubuntu login username as your Samba username.
Code:
Ubuntu Username = jose
Anyway, make sure the Ubuntu username you want to use for Samba access exists in this /etc/samba/smbpasswd file by running the following command:
Code:
sudo smbpasswd -a USERNAME
... and then type in your desired Samba password at the prompt.
Code:
root@uServer:/home/jose# smbpasswd -a jose
New SMB password: *****
Retype new SMB password:*****
Code:
sudo chown -R USERNAME:USERNAME /PATH/TO/SHARE
Code:
root@uServer:/home/jose# chown -R jose:jose /media/store
Multi-user:
In a multi-user setup, things get a bit more complicated. Start by creating a group:
Code:
sudo addgroup GROUPNAME
Code:
root@uServer:/home/jose# addgroup musicvideo
addgroup: The group `musicvideo' already exists.
... then make sure all usernames that the Samba usernames match (or will be mapped to) are members of this group, like this:
Code:
sudo usermod -aG GROUPNAME USERNAME
Code:
root@uServer:/home/jose# usermod -aG musicvideo jose
Code:
sudo chgrp -R GROUPNAME /PATH/TO/SHARE
Code:
root@uServer:/home/jose# chgrp -R musicvideo /media/store
Code:
find /PATH/TO/SHARE -type d -print0 | sudo xargs -0 chmod 2775
Code:
root@uServer:/home/jose# find /media/store -type d -print0 | xargs -0 chmod 2775
In the [global] section:
Code:
username map = /etc/samba/user.map
Code:
root@uServer:/home/jose# cat /etc/samba/user.map
jose=jose
Code:
root@uServer:/home/jose# cat /etc/samba/smb.conf
[global]
workgroup = salnet
username map = /etc/samba/user.map
server string = %h server (Samba, Ubuntu)
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
invalid users = root
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *passwd:*password\supdated\ssuccessfully* .
socket options = TCP_NODELAY
[media]
comment = Public Folder
path = /media/store
writable = yes
root@uServer:/home/jose#
So, I'm not totally confused with what we just did...actually I understand it quite a bit (although the command and such are somewhat foreign but the concept I'm grasping).
However that may be, I'm back to square one without access to the server completely. It asks for authentication but doesn't give me access to the drive. The weird thing is that from "My Network Places" I get authentication request but from "Workgroup Computers" I just get a denial( see attached images).
I reloaded Samba (start/stop daemons) and even restarted the server all together...so although I understand everything, I'm obviously doing something wrong...
Maybe I should start from scratch with a brand new smb.conf and and maybe re-install the server to begin from zero. Removing all info from the original smb.conf and adding as needed.
jc
Bookmarks