Quick samba configuration file example
Here is a quick way to get a samba share up and running with an easy and straightforward smb.conf file.
Edit your /etc/samba/smb.conf file:
# vim /etc/samba/smb.conf
Paste the following into the smb.conf file:
workgroup = WorkgroupName
server string = foo
security = user
load printers = yes
log file = /var/log/samba.%m
max log size = 50
socket options = TCP_NODELAY
comment = Home Directory
path = /home/adam/
valid users = adam
writable = yes
Setting up Samba users with smbpasswd:
Since we chose to use the security mode “users” in our samba configuration file, we need to set up the users. To do so, run:
adam@foo:~$ smbpasswd -a adam
New SMB Password:
Retype new SMB Password:
Remember, you can only add samba users via smbpasswd if they already exists as real users on the machine. To see the real users, take a look at your /etc/passwd file. Also note, for all users you add in your smb.conf to the valid users line, you must create a password for them using smbpasswd.
# /etc/init.d/samba restart
You should now be able to access your samba share from a networked Windows machine. From the Windows computer simply navigate to Start > Run > and enter in the UNC path for the Linux samba server. An example would be \\192.168.1.100.
For a more detailed explanation of setting up a samba configuration file check out my Simple Samba Slackware Setup guide.
Popularity: 3% [?]
Filed under: Linux
Like this post? Subscribe to my RSS feed and get loads more!