I’m a Linux beginner. Every day I’m learning more at work and at home with my big fat Linux book, and it’s alot of fun. I can’t wait for the day when I can format my computers, stick a distro of Linux on, and never have to touch Windows again.
I set up a dev server at work recently, partly because it was annoying for us to have to FTP code changes up before being able to test them. The idea was to set up a server in the office, mimicing our standard server setup, and set up Samba for quick and easy editing. I was reading off the Samba documentation – which is quite thorough – but either I missed something, or they didn’t bother including something because they figured users would be more proficient at Linux.
So, that’s what this post is for. Those people who want to set up Samba, yet don’t have a clue how to.
So, my quick guide to getting Samba up and running.
First up, install it if it’s not installed already. If you’re runing Red Hat/Centos/etc., use:
yum install samba
On Debian distros, I’m pretty sure the alternative for yum is apt-get – but I haven’t touched Debian yet.
Now, for a really basic way to share files with a Windows user, you’ll first want to add the user to the Linux system (now that I think about it, it makes sense, but this was the part that took me ages to realise I had to do).
useradd -d / -n tim
Where / is the user’s home directory – / effectively giving them access to the entire system – and where tim is the username. If you’ll be connecting from the same Windows user all the time, use the same username – that way you won’t need to authenticate again to access the share.
Set the user’s password (again, same as your Windows password if you’re using the same user all the time):
passwd tim
Now, add the user to Samba:
smbpasswd -a tim
And that’s it. How unbelievably easy.
Now, I haven’t yet got into real advanced usage of Samba, but I intend to create a domain controller out of it once I’m able to. If you want to play around, take a look in /etc/samba/smb.conf, or easier still, download Webmin to do it all from a graphical interface.









