Tag Archives: samba

How to Share a Printer to a Windows PC from an Ubuntu PC CodeUnit 07 OCT 2011

Sharing a printer to your Windows laptop or desktop PC from your main Ubuntu desktop machine is made pretty simple thanks to the magic of Samba. Here’s a quick tutorial on how to efficiently share your printer under Ubuntu then:

First, install Samba via the Ubuntu Software Center. (Search for ‘Samba’. That tends to work!)

Next access the properties sheet of the printer which is connected to your system that you wish to share. (System -> Administration -> Printing. Right click on the printer icon and select ‘Properties’).

Select ‘Policies’ on the left menu and check the boxes shown below. (Tick ‘Enabled’, ‘Accepting Jobs’ and ‘Shared’)

Next, click on the ‘Server’ menu option on the Printing dialog and select the ‘Settings’ submenu.

Again, check the boxes shown below: (Tick ‘Show printers shared…’, ‘Publish shared printers…’ and ‘Allow printing from…’)

To make it easy to access the now shared printer from your other systems, you need to make it discoverable. A quick way of doing that is to press Alt+F2 on the keyboard and run:

gksu gedit /etc/samba/smb.conf

Scroll down the file to the Printers section and change the ‘browseable’ value to yes. Save the file and if you are not feeling so confident in restarting services on your machine, restart the whole computer.

Now that the printer is shared on your Ubuntu machine, let’s access it on your Windows laptop.

Access the Printers dialog found in the Control Panel and select the menu option to add a new printer. When prompted, select ‘Add a network, wireless or Bluetooth printer’.

If both your systems happen to be in the same workgroup, then Windows will automatically locate the printer for you and you simply click on it to add. If they aren’t in the same workgroup, then you need to specify the path to the printer yourself.

And that’s it. Nifty, eh?

Ubuntu Lucid Lynx: Simple Way to Mount a Samba Drive in Your Home Directory CodeUnit 24 JUN 2010

Samba is a fantastic free software re-implementation of the SMB/CIFS networking protocol that allows for shared file and print services across a variety of Windows and Unix (and even Mac OS) platforms.

Today’s quick tip highlights a simple way of mounting a remote samba directory as a folder in one’s home directory in Ubuntu.

The terminal command is as follows:

sudo mount -t cifs //[server name/ip address]//[shared folder name] ~/[desired folder name] -o username=[samba username],noexec

So if for example we were running a samba server at and sharing a folder with the name craiglotter and a user account with the username of craig, we would end up with this:

sudo mount -t cifs // ~/UbuntuMediaServer -o username=craig,noexec

After entering your sudo password you will be asked to authenticate the samba user account by entering the associated password. If successful, you should now have a nice and shiny, fully accessible folder named UbuntuMediaServer in your home directory!

Simple stuff! :)