Slackware 12 File Server HowTo Author: s1axter
Written: February 14th 2008, 10:30 am PST
****This article was originally posted July 15th, 2007 but was then pulled. It is up again with a new release date of February 14th, 2008. Enjoy!****

Slackware is the oldest Linux distribution out there still actively developed. Started in 1993 by Patrick Volkerding Slackware aims to be a rock solid distribution and leaves much of the configuration to the end user. Most Linux users are a little taken aback by the simplicity of Slackware; A clean install has no real eye-candy and even initially dumps you into a command login screen even if you have X and a desktop manager installed. This is heaven for those who donít need all the fuss or want to customize most everything in the system. Most packages are builds straight from the development group with little to no modification.

With this KISS design, Slackware is blazingly fast and customizable to the nth degree. As one can imagine this isnít exactly user friendly and it takes someone rather experienced in the Linux environment to get it all up and running. Iíve run Slackware for a number of years now and love it, however there are some really annoying things that havenít changed in the last six major releases. Thatís where this review/How-To comes in. The plan is the release a number of parts covering some of the more important things on a Slackware system. Right now your a reading Part 1 - Samba fileserver.

I have a development/file server box I do all the GI development on and use to host my files/music/etc with my other boxes and via a intranet page(No I will not give you free stuff). This How-To is about getting Slackware up and running as a file server using Samba.

-The Fileserver:
The original desire for running Slackware was for a small headless file server that would run smoothly on a POS machine back in school. After some tinkering it worked, and worked so well I think I ran it for 2 years on a 400Mhz box. I use Samba to share a mounted drive with access restricted to certain IPs and users. If you want to run a file server you are going to need the Samba Server Package in the Slackware Ďní group installed, as well as all network stuff, obviously.

Samba uses a smb.conf file located at /etc/samba to control all the shares on a system. Slackware doesnít have a conf made, but there is an example file; smb.conf-sample. This example wonít be much help if you copy it straight to smb.conf but with a little modification it works just fine.

Lets say you want to share your home dir so only use can read it, and a shared drive for two people to read. Take a look at the following smb.conf:

   guest ok = no
   invalid users = root
   netbios name = FILESERVE
   workgroup = GI
   server string = Geeksinside File Server
   smb passwd file = /etc/samba/smbpasswd
   log file = /var/log/samba-log.%m
   lock directory = /var/lock/samba
   security = SHARE
   ; I use SHARE, makes things go a lot smoother

   comment = Home Directories
   browseable = no
   writeable = yes
   valid users = s1axter
   create mode = 0644

   comment = Storage Drive 1
   path = /mnt/storage1
   writeable = yes
   public = no
   valid users = s1axter firewire

This makes the home directories of the users on the system shares. In this example only I can mount my home and Firewire and I can mount Drive1, a shared drive with lots o good stuff on it. Now if you restart samba with sh /etc/rc.d/rc.samba restart and you browse to the server on another box...say will see Drive1 as a shared folder. Even though Drive1 is there you will find, you canít map it, even if your user on the other box has the same username and pass as your Linux user. To solve this problem you need to add a user to the Samba password file. Run smbpasswd Ėa USERNAME and enter a password when prompted. Restart Samba and now you can map that drive using the USERNAME and password you added using smbpasswd.

There are tons of other options for Samba that I didn't cover here. If you are interested, check out the Samba wiki:

Now before I get flamed, this isnít the most secure solution or the best for really important stuff but it will let you share a drive to Windows boxes. I keep my share mounted as Z: on winblows so all my playlists work on any machine. Try it out.
geoff on Feb 14th, 2008 12:43pm
Thanks really helped. I am new to Slackware (not Linux), quite different from more desktop oriented systems like Ubuntu
Leave a comment:

Comments have been taken down, too much spam. Sorry :-/
Website (optional)

bold[TEXT] - italic[TEXT] - underline[TEXT] - big[TEXT]
Enter Number