Daniel Ngu

Samba Setup

Directory Structure

Directory Structure
1
2
3
4
5
6
$ sudo mkdir -p /shares/data          # data directory
$ cd /shares/data
$ sudo mkdir daniel                   # home directory
$ sudo groupadd data
$ sudo chown daniel:data daniel
$ chmod o-rx daniel

sysadmin

Create sysadmin Account
1
2
$ sudo useradd -m -G data -s /bin/bash sysadmin
$ sudo passwd sysadmin

Config

/etc/samba/smb.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
workgroup = <workgroup-name>
wins support = yes
name resolve order = lmhosts host wins bcast
security = user

[Data]
comment = Data
path = /shares/data
browseable = yes
read only = yes
valid users = sysadmin

[Daniel]
comment = Daniel
path = /shares/data/daniel
browseable = yes
read only = no
valid users = daniel

Sets Samba password. I think smbpasswd ties in with passwd but needed in this case since password was set prior to Samba installation.

Set Samba Password
1
$ smbpasswd -a daniel