[CLUE-Tech] Confused about Samba

Jed S. Baer thag at frii.com
Sun Mar 24 15:22:48 MST 2002


On Sun, 24 Mar 2002 13:54:45 -0700
Matt Gushee <mgushee at havenrock.com> wrote:

> Hi, folks--
> 
> I am having trouble getting started with Samba. All I want to do right
> now is set up file and printer sharing on my home network. Most of the
> time there are two (2) machines on the network -- my Linux desktop PC,
> and my wife's Win98 box.

Depends upon how you want to want to authenticate them, or even if you
want to. I set up my Samba shares as open to anything in my house, using
the "allow hosts" in the smb.conf. Other authentication stuff is possible,
and even setting up "/home" directories for different users.

> So anyway, I don't get it. I have been trying to read the Samba docs,
> but most of them seem to assume you are running in an NT domain, and
> those that don't seem to assume you understand terms like 'master
> browser' -- and know whether you need one or not.

This should get you started. You will want to modify some names/paths.
Also, there's a bit of a problem with printing I haven't figured out,
having to do with the permissions on /var/spool/lpd/lp. Samba printing
works when I chmod 777 /var/spool/lpd/lp - but when I reboot the box,
something in the init changes it back to 700, and samba printing doesn't
work. Hasn't been enough of a hassle for me to track down what the deal
is. Also note that I'm still using good old BSD/lp printing. I didn't care
for the extra complexity of LPRng, which I don't think I need. Yeah, LPRng
is supposed to be better, but it came off the install denying even root
the capability of printing to the local printer. So, since the old lp
stuff works fine, I dumped LPRng, and went back to that.

You'll need to tell your Windoze boxes what workgroup they should belong
to.

One other thing, I have the security=share directive in the wrong place.
It moved at some point in the samba distribution, but everything still
works. I guess I should fix that ;-).

<begin /etc/samba/smb.conf>
; The global setting for a RedHat default install
; smbd re-reads this file regularly, but if in doubt stop and restart it:
; /etc/rc.d/init.d/smb stop
; /etc/rc.d/init.d/smb start
;======================= Global Settings
=====================================[global]

# replace {name here} with whatever you want in workgroup and volume
workgroup = {name here}
comment = Samba server
volume = {name here}
printing = bsd
printcap name = /etc/printcap
load printers = yes
log file = /var/log/samba-log.%m
max log size = 10
short preserve case = yes
preserve case = yes
lock directory = /var/lock/samba
locking = yes
strict locking = yes
share modes = yes
security = share
socket options = TCP_NODELAY 
os level = 0
hosts deny = all
# add your local machine IPs. This is where your DHCP
# assign IPs might be a problem. There's some flexibility
# here, between deny/allow, and I think even wildcarding.
# Don't get too generous though, because the shared volume
# below is wide open.
allow hosts = 192.168.0.2
guest account = nobody
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = no

[printers]
comment = All Printers
path = /var/spool/lpd/lp
browseable = no
printable = yes
public = yes
writable = no
create mode = 0700

[lp]
comment = HPLaserjet4
path = /var/spool/lpd/lp
browseable = yes
printable = yes
public = yes
writable = no
print command = lpr -r -h -P %p %s

;============================ Share Declarations
==============================


# change directory names as needed

[public]
   comment = Public
   path = /public
   public = yes
   writable = yes
   printable = no
   create mask = 0666
   force create mode = 0666
   force directory mode = 0777

[cdrom]
   comment = Public
   path = /mnt/cdrom
   public = yes
   writable = yes
   printable = no
   create mask = 0666
   force create mode = 0666
   force directory mode = 0777
<end smb.conf>
-- 
"Those who expect to reap the blessings of freedom must, like men,
 undergo the fatigue of supporting it."
 - Thomas Paine



More information about the clue-tech mailing list