Best place to start with SAMBA

Discussion in 'Server Operation' started by ichase, Oct 17, 2012.

  1. ichase

    ichase New Member

    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.

    Ian
     
  2. dalitso

    dalitso New Member

  3. ichase

    ichase New Member

    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,

    Ian
     
  4. dalitso

    dalitso New Member

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

    Code:
    create mask = 0777
    directory mask = 0777
    writable = yes
    public = yes
    
    restart samba

    Code:
    restart smbd
    restart nmbd
    
    and run
    Code:
    chmod 777 -R /home/share
    change "/home/share" to the directory that you are sharing
     
  5. ichase

    ichase New Member

    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:
    Code:
    [root@HomeServer ichase]# cat /etc/samba/smb.conf
    #======================= Global Settings =====================================
    [global]
    
       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 ==============================
    ;[homes]
    ;   comment = Home Directories
    ;   browseable = no
    ;   writable = yes
    
    ;[Profiles]
    ;    path = /usr/local/samba/profiles
    ;    browseable = no
    ;    guest ok = yes
    
    [Storage]
       comment = Home Data Storage
       path = /home/storage
       valid users = user user user
       public = yes
       writable = yes
       printable = yes
       create mask = 0777
       directory mask = 0777
    
    [printers]
       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

    Ian
     
  6. dalitso

    dalitso New Member

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

    Code:
    [Storage]
       comment = Home Data Storage
       path = /home/storage
       valid users = user user user
       public = yes
       writable = yes
       printable = yes
       create mask = 0777
       directory mask = 0777
      [COLOR="Red"] browseable = yes[/COLOR]
    
     
  7. ichase

    ichase New Member

    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,

    Ian
     
  8. dalitso

    dalitso New Member

    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.
     
  9. ichase

    ichase New Member

    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,

    Ian
     
  10. dalitso

    dalitso New Member

    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.

    Later,

    Dalitso
     
  11. ichase

    ichase New Member

    Thanks dalitso, Have been reading the Arch Wiki on CUPS and over all it looks like it will be a challenge especially with the HP printer. Going to give the Web Interface a try and see how that goes. I got into linux a little over 2 years ago. Jumped into Arch Linux not long after I started because I wanted more than an alternative OS to run, I wanted to LEARN Linux. No better way then using a Linux Distro that forces you to learn the command line. :D
    I keep a lot of notes and have created numerous binders that I reference often. You definitely never stop learning when it comes to Linux.

    I will let you know how the configuration changes go this evening and hopefully we will have everything set up and working as advertised.

    Ian
     
  12. ichase

    ichase New Member

    That worked in regards to the file server. Have full read write on all my Windows computers. :D

    Need to figure out why Cups refuses to start. Keep getting an error: Child excited on signal 6

    I think there is a bug on this from what I briefly read about.
     
: samba

Share This Page