HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Server Operation (
-   -   Best place to start with SAMBA (

ichase 17th October 2012 22:13

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.


dalitso 21st October 2012 00:06

I have done many samba setups on Ubuntu linux. I am not sure how different the config file locations are but maybe this can shed some light

ichase 22nd October 2012 22:10

Thanks dalitso for the link. The config file locations are the same in Arch then they are in Ubuntu in regards to SAMBA.

Somethings seems just way to easy and obviously I am over thinking this. The share now shows up in Windows under Network, all my users are able to retrieve files from the HDD on the server but when you try to SAVE a file to the server you get "You do not have the permissions to perform this action" With read only set to "no", I should be able to read and write to this share? Am I missing something?

Thanks again for providing the link.

All the best,


dalitso 22nd October 2012 23:21

You are welcome
Make these changes to /etc/samba/smb.conf


create mask = 0777
directory mask = 0777
writable = yes
public = yes

restart samba


restart smbd
restart nmbd

and run

chmod 777 -R /home/share
change "/home/share" to the directory that you are sharing

ichase 23rd October 2012 12:57

Thanks again dalitso
I followed your guidance and now when I see HOMESERVER on the network in Windows, it is not showing the /home/storage folder. The only thing it is showing is a printer. (which I can not connect to) but it is not showing my /home/storage folder.
Here is my smb.conf, as this may help:

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

  workgroup = WORKGROUP

  server string = Samba Server

  security = user

  hosts allow = 192.168.0. 192.168.1. 192.168.2. 127.

  load printers = yes

;  printcap name = /etc/printcap

;  printcap name = lpstat

;  printing = cups

    guest account = nobody

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

  max log size = 50

# These scripts are used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g

#============================ Share Definitions ==============================
;  comment = Home Directories
;  browseable = no
;  writable = yes

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

  comment = Home Data Storage
  path = /home/storage
  valid users = user user user
  public = yes
  writable = yes
  printable = yes
  create mask = 0777
  directory mask = 0777

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

Under [Storage] valid users actually spells out the users with samba accounts.

Not sure if this will shed some light. It seems like I am following all the guidance I am reading but just not hitting the mark. Now granted, I am learning a ton so that is a good thing. :)

Thank you for your help and guidance dalitso


dalitso 23rd October 2012 13:41

add "browseable = yes" at the end of your share


  comment = Home Data Storage
  path = /home/storage
  valid users = user user user
  public = yes
  writable = yes
  printable = yes
  create mask = 0777
  directory mask = 0777
  browseable = yes

ichase 23rd October 2012 14:40

I knew I missed something obvious. Will give that a try this evening and see how it goes. Got a good feeling that will allow the storage folder to show up. Now why does my printer show up in Network as storage and not printer?

I went to add printer, chose network printer and ran the driver for the HP printer. All went well and it is now showing //HOMESERVER/storage as my default printer. Now when I print a test page from MS Word, it shows that it prints with no errors but when I check the queue for the printer there is nothing there?
Do I need to configure CUPS on the server for /var/spool/samba to send the job to the printer?

I really do appreciate all of your guidance and patience,


dalitso 23rd October 2012 16:06

You are welcome.
I am not ure why your printer shows up as storage. I believe you are right about configuring cups, it is the only way I ever got a printer working on a linux server.

ichase 23rd October 2012 16:40

Could it be that I have printable = yes under [Storage] ? I will try removing that line or comment it out and add browsable = yes under [Storage] and go from there. This is more of a project in learning SAMBA but looks like I will need to learn how to configure CUPS at the same time.
I may need to uncomment printing = cups under the global settings. Then figure out how to configure CUPS so that the spool sends print jobs to the actual printer. When I print now, it spools but shows nothing in the queue for the printer itself. Nor does anything print. :)

I do think I am pretty close to having this all working, a few minor tweaks here and there may just seal the deal.

Take care,


dalitso 23rd October 2012 19:33


Originally Posted by ichase (Post 287194)
Could it be that I have printable = yes under [Storage] ?

You know, I am not an expert but I have a few years of experience with linux. I think that line could be the cause, you are right.

Infant, your samba config has more configurations than I ever use. I don't tweak my samba config much. I usually enable "homes" and create a share and change permissions.

We learn everyday, through your experience, I am also learning something.

Let me know when you need help with cups. I remember back when I attempted it, I met some authentication issues. You might come across them as well.



All times are GMT +2. The time now is 01:42.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.