Minimal FC12 Samba install with low RAM usage, high security, and least amount of configuration.
Quickly turn an older machine into a modern Fedora Core 12 file server compatible with linux and windows clients. Less software installed means less setup, less maintenance, less updates, and less chance of human error somewhere along the way. The theory here is, the system starts out relatively secure and (if kept up-to-date) should remains so over time.
There are definitely many other ways to go about setting up a Samba server, much of which depends on your networking environment and overall requirements / constraints. This article is meant more as a guide – my notes which describe the method i happen to use – so that if i have to, i can do it all again.
- Comfortable with install and use of Fedora Core Linux OS (command line)
- Basic understanding of networking concepts (setting up a static IP)
- Some experience with editing the smb.conf file
- No GUI / Desktop Environment
- Low RAM usage: boots up @ ~80MB with smbd and nmbd running
- SELinux and iptables firewall enabled / configured for use with Samba
- Samba Security level = User
CPU: AMD @ 700MHz
- Download and burn the Fedora-12-i386-DVD.iso file to dvd
- Boot from the disc and go through install process (with less that 200MB RAM it defaults to text mode install – you can also force a text mode install at the boot: prompt by typing: linux text)
- Once install is completed and system is rebooted, login as root
- Check that networking is up
(see if you have an IP address)
(to use dhcp for now)
- Bring the system up to date
(to check for updates first)
(say “yes” to install the updates)
- Check to see what package “groups” got installed by default
yum grouplist > grouplist.txt
cat grouplist.txt | more
- Remove any unwanted package groups
yum groupremove "Mail Server"
- Add the Samba package group
yum groupinstall "Windows File Server"
- Configure Samba by editing /etc/samba/smb.conf
- Note, for Vista support (in the Global section) add:
client NTLMv2 auth = yes
- Note, to hide unreadable files like /lost+found/ (in the Global section) add:
hide unreadable = yes
(confirm output has no errors in it)
- Deal with SELinux security policies (see default smb.conf file for details)
setsebool -P samba_domain_controller on
setsebool -P samba_enable_home_dirs on
chcon -t samba_share_t /path-to-mounted-directories
(remember to mount any/all directories first)
ls -ldZ /path-to-mounted-directories
(to confirm it worked)
- Note, for existing shares, to make sure this affects all files and folders recursively add:
chcon -R -t samba_share_t /path-to-existing-mounted-directories
- Note: to completely disable SELinux protection for smbd daemon (not recommended) type:
setsebool -P smbd_disable_trans 1
- Note: you can temporarily disable SELinux by putting it into permissive mode – type:
to find out whether SELinux is in permissive , enforcing , or disabled  mode.
- Note: to put SELinux into permissive mode (for testing purposes but not recommended) type:
- Add samba users
smbpasswd -a john
- Configure the firewall to accept samba connections
(add an asterix next to the line: “Samba”)
- Configure the network to use static IP/netmask/gateway/DNS info
- select: [Edit a Device Params] and remove the asterix from the line: “Use DHCP”. then, and add static info
- Configure the network to use a static Hostname and DNS address (note: DNS settings may not be required)
- select: [Edit DNS configuration] then, and add static hostname and dns info
- Get the network, smb, and nmb to start automatically next time you reboot
chkconfig --level 3 network on
chkconfig --level 3 smb on
chkconfig --level 3 nmb on
chkconfig --list network
(or smb, or nmb to confirm it worked. you can also leave out the servicename to see a list of all services)
yum list installed
(to see a list of all installed packages)
Use another computer to check that everything went well.
1. Install NTFS support.
yum install ntfs-3g
2. Once it’s done downloading/installing, figure out which device it is (for me it was /dev/sde1) and mount it.
mount -t ntfs /dev/[your-usb-device] /media/
3. Deal with selinux and ntfs support
setsebool -P samba_share_fusefs 1