Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 17th October 2012, 21:13
ichase ichase is offline
Junior Member
 
Join Date: Nov 2010
Location: Virginia Beach,VA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

Ian
__________________
Always do right. This will gratify some people and astonish the rest.
Mark Twain

Registered Linux User # 526317
Reply With Quote
Sponsored Links
  #2  
Old 20th October 2012, 23:06
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

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 https://help.ubuntu.com/12.04/server...ileserver.html
Reply With Quote
  #3  
Old 22nd October 2012, 21:10
ichase ichase is offline
Junior Member
 
Join Date: Nov 2010
Location: Virginia Beach,VA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
__________________
Always do right. This will gratify some people and astonish the rest.
Mark Twain

Registered Linux User # 526317
Reply With Quote
  #4  
Old 22nd October 2012, 22:21
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

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
Reply With Quote
  #5  
Old 23rd October 2012, 11:57
ichase ichase is offline
Junior Member
 
Join Date: Nov 2010
Location: Virginia Beach,VA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
__________________
Always do right. This will gratify some people and astonish the rest.
Mark Twain

Registered Linux User # 526317
Reply With Quote
  #6  
Old 23rd October 2012, 12:41
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

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
   browseable = yes
Reply With Quote
  #7  
Old 23rd October 2012, 13:40
ichase ichase is offline
Junior Member
 
Join Date: Nov 2010
Location: Virginia Beach,VA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
__________________
Always do right. This will gratify some people and astonish the rest.
Mark Twain

Registered Linux User # 526317
Reply With Quote
  #8  
Old 23rd October 2012, 15:06
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
Default

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.
Reply With Quote
  #9  
Old 23rd October 2012, 15:40
ichase ichase is offline
Junior Member
 
Join Date: Nov 2010
Location: Virginia Beach,VA
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
__________________
Always do right. This will gratify some people and astonish the rest.
Mark Twain

Registered Linux User # 526317
Reply With Quote
  #10  
Old 23rd October 2012, 18:33
dalitso dalitso is offline
Member
 
Join Date: Nov 2008
Location: South Africa
Posts: 43
Thanks: 3
Thanked 4 Times in 3 Posts
Send a message via Skype™ to dalitso
 
Default

Quote:
Originally Posted by ichase View Post
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.

Later,

Dalitso
Reply With Quote
Reply

Bookmarks

Tags
samba

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
monitrc configuration for Debian ISPConfig 3 server Hans Tips/Tricks/Mods 2 27th March 2011 23:22
The Perfect Server - Ubuntu 10.10 [ISPConfig 3] artifact66 Installation/Configuration 3 14th March 2011 13:06
Monitoring server Ubuntu wiss Installation/Configuration 7 20th November 2010 12:56
Monit & Munin SamTzu HOWTO-Related Questions 1 4th May 2008 18:03
"Too many open files in system" problems Berry Installation/Configuration 3 10th November 2007 21:58


All times are GMT +2. The time now is 10:57.


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