Although many Windows networks take advantage of Active Directory and Domains, I see plenty of smaller networks out there that only use the workgroup solution to enable machines to see one another (and share folders/printers). Most people assume the Workgroup is something that only Windows machines can enjoy. Not so. Linux machines can also take advantage of this networking feature with the help of Samba. Through the magic of blogging, I am going to illustrate how you can join your Linux machine to a Windows Workgroup.
For the purpose of simplicity, I am going to demonstrate this task on a Ubuntu 10.04 machine. The process will be similar on just about any distribution (with the biggest difference being the installation of Samba). So, with that said, let's get to it.
This, of course, is the first step in this process. To install Samba open up a terminal window and issue the command:
sudo apt-get install samba smbfs
You will need to enter your sudo password for this to work. There might also be dependencies to install, which will be dictated by what you currently have installed on your system. Once complete, you will have the Samba system installed and ready to be configured.
Configuring SambaNow it's time to open up the /etc/samba/smb.conf file and look for the line:
workgroup = WORKGROUP
You can always open that file with gedit if you like. I prefer using nano as my text editor (no need to start a text editor flame war here). What you need to do is to change WORKGROUP to match the actual name of the Workgroup you need to join. After you have that complete, save the file, and restart Samba with the command:
sudo /etc/init.d/smbd restart
You can also restart Samba with the command:
sudo service samba restart
Your Ubuntu machine should now show up for anyone else who happens to be in the same Workgroup. You can also begin sharing out folders to other users. This is very simple to do from within the Nautilus file manager. Just right-click a folder and click the Sharing Options entry. This will allow you to easily set up file sharing as well as specific permissions for that folder.Final thoughts
I well remember the days when sharing folders out with Windows computers was a far more challenging task than what you see today. Fortunately, Linux has finally caught up to the idea that being on a homogeneous network should be a no-brainer for users. Hopefully the developers of Samba will eventually create an even simpler way for Linux machines to join a Workgroup - without having to ever open up a command line.
Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.