-   Linux - Networking (
-   -   Best place to start with SAMBA (

ichase 10-17-2012 02:26 PM

Best place to start with SAMBA
Greetings Everyone,
I have built a headless server which is running Arch Linux.
I have 6 Computers on the network.
2 are Linux (Arch)and 4 are Windows 7 (Different variants)
I have installed the SAMBA suite on the server.
The Server has 2 hard drives. 1 sda1 is 20 GB and holds the OS, the other; sdb1 is a 500GB drive formated to NTFS. I have a Printer attached via USB to this server but no keyboard, mouse, or monitor.
I perform all updates to the server via SSH.
I simply want all 6 computers in the house to be able to save files to that 500 GB HDD in the server and print from the printer attached to that server.
I am trying to find out where to start? There is hundreds of links via Google for SAMBA, my problem is, I don't know if I am reading step 6 of the process or step 26. There are hundreds of various smb.conf examples out there, all in which are different of course. I will read the fine manual, I just need one that where I know I am on page 1 of chapter 1. :)
If you could point me in the right direction or if you are knowledgable with SAMBA and would like to provide me guidance, I would be most appreciative, and most patient.

All the best and thank you up front for any and all responses.


custangro 10-17-2012 02:36 PM

I've always loved How To Forge...great community of "howtos"


camorri 10-17-2012 02:46 PM

There are some simple tutorials on this board, if you go to Tutorials Networking. One there is called Samba - up and running. It is straight forward. Best advice is 'start simple' and add things as you need them.

There are some things to do to your server, before I would much with samba. Fist of all, re-format your second drive to a linux file system. NTFS would be much harder to recover, if things ever go wrong.

Second, install the printer, and get it working with cups before you try remote printing with samba. You need to know you have a working linux driver, and the printer works.

Third, I would install Swat on linux. It is very good tool to manage your samba system. You can add users, manage passwords and the smb.conf file. Well worth the time and effort.

Since it is a headless system, you may want to consider Webmin as well. Nice tool to manage the linux system remotley. You can manage samba with it, or use swat within webmin.

O.K. now create a simple file, with one share. Add you users. Make sure you can access the share from each windows system. W7 has come issues with samba. Thank Uncle Bill for that. Googling will turn up problems, and solutions for you. Of course you can always ask here....

Hope this helps.

ichase 10-17-2012 03:08 PM

Thanks for the response C, yes How to Forge is a great site and has been helpful in the past with some of my Linux adventures. ;)

ichase 10-17-2012 03:30 PM

Thanks for your reply Cliff,
I have a laptop running Arch Linux that I use to control the server via SSH. I installed gutenprint, a collection of high quality drivers for Canon, Epson, Lexmark, Sony, Olympus, and PCL printers for use with GhostSscript, CUPS, Foomatic, and the GIMP on the server so hopefully this driver package will allow for printing with no issues.
Now by formating the 2nd (Storage) drive to let's say ext4, would that not result in issues seeing the drive in Windows? The only people at the house are my wife and I. I want to be able for myself or her to be able to create folders on this drive, add files to those folders etc just as if it were a "My Documents" folder within Windows but also for me to do the same from my Linux machines.

So I should install webmin and SWAT on the server. Now mind you, this is Arch and I don't have a DE or WM installed. No need for one as I can do most things via the command line. But as I read, I believe that I would access webmin via HTML? Kinda like you would configure your router via HTML correct?

I do have a simple file I added to the 500 GB hardrive called test.txt. That was going to be the document I was going to try and find with my Linux and Windows machines.

Thanks again and I hope I do not try yours or anyone elses patience.


camorri 10-17-2012 05:28 PM


would that not result in issues seeing the drive in Windows?
Absolutely not. The windows systems do not see the file system at all. I have several samba servers, W7, Vista, and XP can all store and retrieve data. All systems can print to my Brother laser printer.

There are parameters you can set in the smb.conf file to allow for what ever read write operations you want on a share basis. This is where smb.conf gets a little more complicated. This is why I suggested you start simple, create one share, and swat. Swat makes it easier to change settings on the share, and get it set up the way you need.

Swat and Webmin are choices you can make. They are not required. You can access swat and webmin remotely. You use any web browser say on your work station ( not the server ) in the location bar you would type http://ipaddrofserver:10000 for webmin and for swat http://ipaddrofserver:901 10000 and 901 are the standard ports, you can make either program run on different ports in their config files.


Thanks again and I hope I do not try yours or anyone elses patience.
You are most welcome. Glad to help.

ichase 10-18-2012 08:09 AM

Thanks again for the guidance. Installed webmin on the server, configured /etc/webmin/miniserv.conf and now I am in. I actually logged in with https://192.168.X.X:10000
I have read you can run Swat within Webmin. Need to do some more research on that.


frankbell 10-18-2012 10:13 PM

The one Samba reference that did it for me was Samba by Example.

debianguru85uk 10-19-2012 05:23 AM


Have a look at the following tutorial.

The only thing to make share where users can read and write and edit you should add the following line to the share configuration.

Let me know what you are trying to do and I can write the Samba share configuration for you.


ichase 10-19-2012 07:51 AM

Thank you frankbell and debianguru85uk for your responses and guidance. I will delve into the tutorials you posted. I have got Webmin up and running, Webmin has SWAT included in it so I am able to access my server utilizing both tools. Tried to get the printer set up this morning. Set it up with the name Home_Printer set to /var/spool/ but when I went to my Windows 7 laptop it is still not seeing this printer on the network. I have also set up the share with the 500 GB HDD with the path /mnt/storage. Will hopefully be able to get that to the point in which I can see it. Baby steps, but once the light bulb illuminates I should hopefully be good.

Of to read your links gentleman.

Thanks again,


debianguru85uk 10-19-2012 08:56 AM

Hi Ian,

You are welcome.

Let us know how you get on.

camorri 10-19-2012 09:36 AM


Set it up with the name Home_Printer set to /var/spool/ but when I went to my Windows 7 laptop it is still not seeing this printer on the network.
The first thing with the printer is to get it to print locally. As an alternative, you should be able to set up printing from a linux system using only cups, on the remote linux system. ( Assuming you have cups running on the headless server. This in no way uses samba. The exercise here is to verify the printer works on linux first.

You will not see the printer on your windows systems until you have samba server set up, with the appropriate config for the printer.

ichase 10-19-2012 11:40 AM

Have CUPS installed on the server. Will get that set up first and go from there.
The documentation that was linked by debiangury85uk and frankbell are actually very helpful.
Like any journey, learning and understanding how everything comes together is the hard part. Waiting for the light bulb moment, but know it's close.

Thanks again,


ichase 10-21-2012 01:12 PM

Greetings all
Still plugging away, reading, trying different things but I am chasing my tail and getting pretty fustrated.
The question came up earlier, what exactly am I trying to do:
I have a headless server, it has 2 hard drives sda1 which houses the OS (Arch Linux) and a 2nd hard drive sdb1 which is now formated to ext3 and is mounted at /home/storage
I want all the computers in the house (3 Windows7 2 Arch Linux) to be able to save, retrieve, write files to the network hard drive sdb1 mounted at /home/storage on the server.
I have a HP DeskJet 7310 connected via USB to the server, I want all computers to be able to print to this printer via the server.
I have worked inside webmin and swat and still no joy. After a lot of reading, I created a backup of the original smb.conf file and created a new one. Here is the smb.conf file I have so far.

[root@HomeServer ~]# cat /etc/samba/smb.conf
#======================= Global Settings =====================================

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
  workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
  server string = Samba Server

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
  security = user

  hosts allow = 192.168.0. 192.168.1. 127.

  load printers = yes

  printcap name = /etc/printcap

  printcap name = lpstat

  printing = cups

;  guest account = pcguest

  log file = /var/log/samba/%m.log

  max log size = 50

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;  interfaces =
#============================ Share Definitions ==============================
  comment = Home Storage
  path = /home/storage
  browseable = yes
  guest ok = yes
  read only = no
  create mask = 755

    path = /usr/local/samba/profiles
    browseable = no
    guest ok = yes

  comment = All Printers
  path = /var/spool/samba
  browseable = yes
  public = yes
  guest ok = yes
  writable = yes
  printable = yes

  comment = Home Storage
  path = /home/storage
  valid users = ichase ian sharon
  public = yes
  writable = yes
  printable = yes
  create mask = 0765

As of now, I still can't see this server on my network. On one of my Windows 7 laptops, it does not even pop up on the network list. I can ping the server with no problem so it's there on the network but still no joy. And I don't see the printer either. I have loaded the correct drivers on the Windows 7 computers as well as the Linux computers.

I have created SAMBA users. On my Windows 7 machine I am able to access this hard drive and see the test.txt document I have created only by accessing it through the URL. \\192.168.0.X\share\ but it does not show up in my Network Infastructure nor am I able to save a file to it or create a shortcut for it. I am close, at least at this point I can "SEE" the hard drive on the network but I am obviously still far from being able to save any files to it.
On the bottom of the screen in Windows it states:
Offline status: Online
Offline availability: Not available

Thanks again for all the help and guidance. I think I am close but just missing something.

All the best,


ichase 10-22-2012 12:48 PM

Making some head way. Ignore the smb.conf file above as it has changed. I can now see the shared directory under Network in Windows 7. On the wife's netbook (Windows 7 home) it prompted for her name and password and it allowed her to access the share.
Now I have it set to Read/Write for all users but when I try to save to it, I get permission denied? I don't have the users set to read only, they are set to Read/Write.

Forget the printer, I can't even see that. But I am going to tackle one thing at a time. Also the strange thing is, when I go to network in Thunar (Linux) I don't see the Homeserver at all.

So baby steps. Maybe someone can shed some light on why I can't save to the shared drive on the server and can only read.

Thanks again,


All times are GMT -5. The time now is 06:38 AM.