Windows

How to join Ubuntu to a Windows Workgroup

Do you need to join your Linux workstation to a Windows Workgroup? Believe it or not, it isn't a challenging task. In this Open Source blog, Jack Wallen walks you through the steps so that your Linux machine can play nice on that Windows Workgroup.

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.

Installing Samba

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 Samba

Now 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.

About

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 getjackd.net.

12 comments
BrightLibra@Gmail.com
BrightLibra@Gmail.com

This is the kind of thing that keeps me coming back to read the blogs here... Basic, I really understand it (write code hacks for Samba) and still you guys get it right and share it well. Short, to the point and useful. Thanks Jack!

roy.evison
roy.evison

I concur. Not that I've tried it out but a quick thought: the easier you make it the less versatile it is. Roy.

harendra87
harendra87

This article has given me a good idea about samba service.. Thanx..

rodriguez.juanpablo
rodriguez.juanpablo

Hi! This works fine except when the windows machine have Live Essentials 2011 installed. In previous versions of Live software, uninstalling "Windows Live Sign-in Assistant" was enough to acces windows share, now it seems that this is included on the whole package.

wyllys
wyllys

Thanks for your nicely succinct summary. But in your Final Thoughts, didn't you mean to say "heterogeneous network"?

bart85
bart85

how old is this article ? previous century !

rduncan
rduncan

yeah I remember doing this in college, on NT4 with mandrake. back then samba could be your BDC, ah memories

DonSMau
DonSMau

I've been struggling with Samba a bit lately and this fixed all my problems. You're timing could not be better!!

fashizzlepop
fashizzlepop

When you homogenize milk, you take from different milk sources to create ONE similar substance. Ie. Different OSs to create one smoothly flowing network.

daboochmeister
daboochmeister

Has anyone gone through the process with the Likewise 5 software that's in the Ubuntu repos? That level of integration into Active Directory permits much more complete use cases -- like, logging in to the Linux box using your Windows account credentials, controlling filesystem access via Windows groups, etc. That would be an interesting blog (would do it, but I don't have an AD server at the moment).

anachron
anachron

Actually you can do 'sudo apt-get install swat' in Ubuntu, then navigate to http://localhost:901 with your browser and set the workgroup name using nice web interface. There's just one problem: you have to create a password for root (sudo -i, then passwd). To say about other distributions, there's a wizard for Samba configuration in Mandriva control center, and with (open)SUSE's YaST you can even join a NT domain or set up a primary domain controller. No need to hack configuration files by hand these days.

water-man
water-man

I have connected my Ubuntu laptop to my other Windows machines via RDP and IP addresses, but this is a lot more straight-forward. Thanks!