How to Change a Workgroup in Linux

How to Change a Workgroup in Linux
Page content

Why Join a Windows Workgroup?

There are many reasons you may need to join a Windows workgroup, including but not limited to, file sharing and printer sharing. In today’s computing environment it is very common to have both Windows and Linux machines on the same network, this happens in both work and home networks, and you will eventually want to share files/printers between these two very different operating systems.

Samba

Luckily for people who connect to a multi-platform network, Samba, which is a software package that enables users to easily and transparently share resources between Windows and Linux machines, is available to streamline this process. With Samba installed you can easily share multiple resources between machines that run different operating systems with a few minor modifications to the default Samba install.

Installing and Configuring Samba

Samba is easily installed via CLI (Command Line Interface) using the following commands:

sudo apt-get install samba

sudo apt-get install smbfs

Once Samba is installed you will want to perform the following steps to configure your Samba install to connect to your Windows workgroup.

  1. Backup the original smb.conf file. In a terminal: sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.BAK
  2. Open smb.conf for editing. In a terminal: sudo nano -w /etc/samba/smb.conf
  3. Find the line that reads: workgroup = MSHOME
  4. Replace MSHOME with your Windows workgroup name.
  5. Restart the Samba service. In a terminal: sudo /etc/init.d/samba restart

Accessing Windows Shares using Samba

File Server

The current version of Ubuntu and the GNOME desktop environment make it very easy to access your Windows network shares once Samba and smbfs have been installed and configured. On your GNOME desktop click the Places menu item and then Network. The nautilus window that opens will have a “Windows Network” icon. Double clicking this icon will reveal all the Windows workgroups on your network. Double clicking your Windows workgroup will give you a list of all computers on that network that have resources shared. From here you can double click any of these shares to mount it on your Ubuntu machine giving you easy access to them.

What now?

That’s all there is to accessing shared resources on a Windows machine from Ubuntu Linux using Samba. It only makes sense that if you have occasion to access Windows shares from your Ubuntu machine you may also encounter a situation where you want to access Linux shares from your Windows machine(s). For an excellent guide on how to setup Samba to allow Ubuntu Linux to share files with Windows using Samba please visit our Bright Hub guide on setting up a Linux samba file server.

Conclusion

As mentioned before, the process of connecting Windows and Linux machines on the same network is a fairly simple process on current releases of Ubuntu, as well as its derivatives. The ability of Linux to play nice with a Windows network is very important for the success of Linux. There are always going to be Windows users but in today’s computing environment we are not pigeon-holed into using the same operating system as them in order to share resources. Have an interesting Windows/Linux networking setup? Let us know via the comments box.

Photo Credits

All photographs courtesy of stock.xchng.