LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-17-2008, 04:54 PM   #1
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Rep: Reputation: 40
Samba question


I have recently installed Slack 12 on my desktop machine changing from Kubuntu. During installation I created a partition specifically to use as a Samba share (/public). How can I share that a partition in Samba? I currently get the error "You can only share folders that are in your /home directory" or something to that effect. I would rather not set it up as root (if that is possible).

Thanks in advance,
Eric
 
Old 02-17-2008, 06:15 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
There's no problem with setting it up as root, if by that you mean logging in as root, editing /etc/samba/smb.conf, creating a share and re-starting Samba. It's possible to restrict shares to users or groups and to force file and directory creation masks. For example:
Code:
[testshare]
  comment = Shared area for general access by the managers group
  path = /public
  writable = yes
  available = yes
  valid users = @managers
  create mask = 0660
  directory mask = 0770
  force group = managers
The Samba by Example docs are useful for setting up different share types.
 
Old 02-18-2008, 05:54 AM   #3
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Original Poster
Rep: Reputation: 40
Thank you gilead, I'll Give that a try tonight. I'll certainly read through the Samba by Example pages as well.

Thanks again,
Eric
 
Old 02-20-2008, 01:04 AM   #4
evilDagmar
Member
 
Registered: Mar 2005
Location: Right behind you.
Distribution: NBG, then randomed.
Posts: 480

Rep: Reputation: 31
Pfft. Edit /etc/inetd.conf and uncomment the line relating to SWAT, then `killall -HUP inetd` to tell the superserver daemon to re-read it's config file. Then point your browser at http://thatmachinename:901 and use the wizard to configure Samba. Much, much easier.
 
Old 02-21-2008, 07:25 PM   #5
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Original Poster
Rep: Reputation: 40
the wizard is certainy easier, however I can not see the server on any of my other machines. It may be a router thing, I'll have to look into it more.
 
Old 02-23-2008, 03:17 PM   #6
nekkutta
LQ Newbie
 
Registered: Feb 2008
Distribution: Slackware 12
Posts: 22

Rep: Reputation: 15
are you just wanting a file server that any machine on your network can access? if so I can help here.

Here is my smb.conf file, notice the include statement so I can add machine specific shares to smb.conf.<machine name>

basically I added a user to the system (smbaccess) and added a directory (samba) to the home directory that I have a 320GB drive mounted to. smbaccess is the owner for that whole directory tree

also you might like to add a default WINS server in your routers dhcpd configuration to point at a samba system or a windows system, I had to do that before my network neighborhood would behave correctly (stupid windows)

pay attention to the hosts allow statement and edit it to your network

Code:
# the user needed for guest account is smbaccess
[global]
workgroup = MSHOME
security = share
netbios name = MICRON
null passwords = yes
passwd chat timeout = 26
server signing = Auto
server string = Samba %v on %L
paranoid server security = no
wins support = yes
preferred master = yes
time server = yes
domain master = yes
local master = yes
os level = 190
ldap ssl = No
disable netbios = no
DNS Proxy = no
name resolve order = bcast wins
hosts allow = 192.168.1. 192.168.2.
hosts deny = ALL 
restrict anonymous = no
message command = /bin/mail -s "SMB Message From %f on %m" root <%s; rm %s &
deadtime = 10
:max disk size = 20000
read only = yes
guest account = smbaccess
invalid users = root bin daemon adm sync halt mail news uucp operator
load printers = no
include = /etc/samba/smb.conf.%m



[global share]
path = /home/samba/gshares
guest ok = yes
guest only = yes
browseable = yes
case sensitive = no
write ok = yes

[backup]
path = /home/samba/backup
guest ok = yes
guest only = yes
browseable = no
case sensitive = no
write ok = yes

[Linux]
path = /home/samba/linux
guest ok = yes
guest only = yes
case sensitive = no
write ok = no

[MP3s]
path = /home/samba/mp3s
guest ok = yes
guest only = yes
case sensitive = no
write ok = yes
hope that helps a bit
nekkutta

Last edited by nekkutta; 02-23-2008 at 03:20 PM.
 
Old 02-24-2008, 07:30 PM   #7
em21701
Member
 
Registered: Feb 2008
Location: Rhode Island, USA
Distribution: Slackware12.2 & Slackware64-current
Posts: 265

Original Poster
Rep: Reputation: 40
Thanks, nekkutta that is exactly what I am trying to do. I have already created a new user (sambauser) and a new group (sambagroup) with ownership of all the files in the shared directory (/public) I have not had enough time to play with the samba/router configuration.

Thanks again,
Eric
 
Old 02-24-2008, 08:59 PM   #8
nekkutta
LQ Newbie
 
Registered: Feb 2008
Distribution: Slackware 12
Posts: 22

Rep: Reputation: 15
another thing you might want to do is add a root cron entry for '/bin/chown -R sambauser:sambagroup <your shared base directory>/*' that way if you ssh to the machine and move stuff around with someone other than sambauser (ie. root) you won't have to worry about permissions. I've gotten bitten by that a couple times before I looked up how to use cron.

nekkutta
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba question 24giovanni Linux - Software 1 11-24-2006 01:34 PM
Another Samba question Pedal2Metal Linux - Newbie 1 10-29-2004 03:31 AM
samba smb.config question (quick question) TheDOGG Linux - Networking 1 03-02-2004 07:19 AM
samba question geldall Linux - General 5 01-24-2003 02:45 AM
RE: Samba question pls help {Newbie question} Radiouk Linux - Networking 4 06-03-2002 06:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration