# samba users

## 22decembre

hi

someone has said me that sharing files in a lan with laptops is easier over samba (when the laptop disconnect from the network, nfs has a hangover on the server and the laptop whereas samba not, just need to be gently killed)

So, I am currently planning a samba server.

```

#======================= Global Settings =====================================

[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH

   workgroup = 22DECEMBRE

# server string is the equivalent of the NT Description field

   server string = Samba Server

# Security mode. Defines in which mode Samba will operate. Possible

# values are share, user, server, domain and ads. Most people will want

# user level security. See the Samba-HOWTO-Collection for details.

   security = user

# This option is important for security. It allows you to restrict

# connections to machines which are on your local network. The

# following example restricts access to two C class networks and

# the "loopback" interface. For more examples of the syntax see

# the smb.conf man page

   hosts allow = 192.168.0. 127. 2a01:e35:8aee:5ab0::/64

# Uncomment this if you want a guest account, you must add this to /etc/passwd

# otherwise the user "nobody" is used

;  guest account = pcguest

# this tells Samba to use a separate log file for each machine

# that connects

   log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).

   max log size = 50

   domain master = yes

# Preferred Master causes Samba to force a local browser election on startup

# and gives it a slightly higher chance of winning the election

   preferred master = yes

   dns proxy = no

#============================ Share Definitions ==============================

[homes]

   comment = Home Directories

   browseable = no

   writable = yes

# This one is useful for people to share files

;[tmp]

;   comment = Temporary file space

;   path = /tmp

;   read only = no

;   public = yes

# A publicly accessible directory, but read only, except for people in

# the "staff" group

[partage]

   comment = Partage réseau

   path = /home/partage

   public = yes

   writable = yes

   printable = no

;   write list = @staff

[portage]

   comment = Arbre portage

   path = /mnt/portage

   public = yes

   writable = yes

   printable = no

[distfiles]

   comment = Distfiles

   path = /mnt/distfiles

   public = yes

   writable = yes

   printable = no

```

Now, I have also sync passwords of root and a casual user.

Currently, when root mount shares (like the fstab way), the user can't write in his own share (home dir on the server).

It is annoying…

In fact, I want my users to be able to read and write on the server according to unix groups and permissions and without mounting themselves the shares.

(but if you still have idea on nfs, it would be good as much more easier, it needs not to block everything when bruttaly disconnected)

Thanks in advance for help

----------

