Configuring a Samba Server

The Samba server is configured by the smb.conf file. Look in the startup script to see where smbd expects to find the configuration file. On a Red Hat system, it is /etc/samba/smb.conf, on another system it might be /etc/smb.conf, and the default used in most Samba documentation is /usr/local/ samba/lib/smb.conf. Use find or check the startup script so you know where it is on your system.

The smb.conf file is divided into sections. Except for the global section, which defines configuration parameters for the entire server, the sections are named after shares. A share is a resource offered by the server to the clients. In the context of this chapter, it is a filesystem that is offered by the server for the clients to use for file sharing. A share can also be a shared printer. Printer sharing is the topic for Chapter 10, "Printer Services," so Samba printer shares are covered there.

The best way to learn about the smb.conf file is to look at one. Minus comments and all of the lines that deal with sharing printers, the Red Hat smb.conf file contains the active lines shown in Listing 9.9.

Listing 9.9: Active Lines in the Red Hat smb.conf File


workgroup = MYGROUP

server string = Samba Server log file = /var/log/samba/%m.log max log size = 0

security = user encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 dns proxy = no [homes]

comment = Home Directories browseable = no writable = yes valid users = %S create mode = 0664 directory mode = 0775

Was this article helpful?

0 0

Post a comment