Samba Quickies
Summary:
- My Windows boxes can't see my Samba server
- How to make a share for a group of users
- What should I put in the homes section
My Windows boxes can't see my Samba server
Make sure you define wins support = yes in the ~[global] section of /etc/samba/smb.conf. This tells samba to become the WINS server for the network.
Insert the IP address of your Samba server in the WINS section of the TCP/IP protocol on each Windows machine.
If you are using DHCP, you can also pass the WINS server IP to the clients via the 'netbios-name-servers' option.
First you must find a suitable base for your shares; one that the security program msec will not interfere with.
If you don't understand msec, it sometimes has a nasty habit of clobbering your directory permissions. Hint: check your partition sizes with
du -h
WHO: Create a group for these users:
As root:
groupadd accounting
Now with your favorite way, add users to this group.
WHERE:
I use a separate partition mounted off of the / partition. If you don't have this you could create a directory off of /home, say /home/shares.
For this example, we'll say you are using /home/shares.
As root:
mkdir -m 751 /home/shares mkdir -m 2770 /home/shares/accounting chgrp accounting /home/shares/accounting
And now add your share to /etc/samba/smb.conf:
~[Accounting]
comment = \for the accouting group
path = /home/shares/accouting
browseable = no
guest ok = no
valid users = @accounting
writeable = no
write list = @accounting
create mask = 771
directory mask = 770
map hidden = yes
map archive = yes
map system = yes
available = yes
- browseable = no tells Samba that this share will not be visable in the Network Neighborhood. Change this to yes if you want this share visible.
- map hidden = yes, map archive = yes, and map system = yes tell Samba to respectively honor these Windows file attributes.
As root:
service smb reload
What should I put in the homes section
Decide where each user's Windows home directory will be located. I use /home/user/windows.m and my users map the share as their M: drive.
For each user, create their directory as follows substituting the real user's name for USER.
As root:
mkdir -m 2770 /home/USER/windows.m chmod USER.USER /home/USER/windows.m
mkdir -m 2770 /etc/skel/windows.m
Now change the ~[homes] section to:
~[homes]
comment = Home Directories
path = /home/%U/windows.m
available = yes
browseable = no
valid users = %S
writable = yes
\public = no
only user = no
directory mask = 770
create mask = 771
map hidden = yes
map archive = yes
map system = yes
fake oplocks = yes
Version 1.18 last modified by chua seng chan on 19/05/2006 at 06:38
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!