LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 12-27-2001, 12:29 PM   #1
tboneshep
LQ Newbie
 
Registered: Dec 2001
Distribution: RH 7.2
Posts: 2

Rep: Reputation: 0
Samba


New to Samba/Linux--I can see the Linux computer in the XP/Win98 browse list, but I cannot access any share on it.
using RH 7.2, I can see the shares from the Linux box, but not from Wins clients. Added the IP address to LMHosts file, ports are open on the services file. "No service is operating at the destination network endpoint..." SMBD, NMBD, samba load at boot ok. Ran the "testparm" on smb.conf without errors, but smbstatus gives an error I don't understand. Tried changing security = users to security = share but didn't make a differance. Any suggestions appreciated!
Verified rpm -q packages:
samba-2.2.1a-4
samba-client-2.2.1a-4
samba-common-2.2.1a-4
Get the following error when using smbstatus from the console:
Samba version 2.2.1a
Service uid gid pid machine
----------------------------------------------
Can't initialise locking module - exiting

Also, looking at the "log.smbd" file, I see this error
[2001/12/26 20:19:11, 0] param/loadparm.c:map_parameter(1923)
Unknown parameter encountered: "guest"
My SMB.CONF file is this, basic, I just wanted to share a directory to access Linux from Windows:
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = MSHOME
hosts allow = 192.168.0.

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
;guest account = tboneshep
# this tells Samba to use a separate log file for each machine
# that connects
; log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
; max log size = 2

# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
; password level = 8
; username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
# encrypt passwords = yes
# smb passwd file = /etc/samba/smbpasswd

# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*


# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
; interfaces = 192.168.12.2/24 192.168.13.2/24

# Configure remote browse list synchronisation here
# request announcement to, or browse list sync from:
# a specific host or from / to a whole subnet (see below)
; remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
remote announce = 192.168.0.255

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
; os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
; domain master = yes

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
; preferred master = yes

# Enable this if you want Samba to be a domain logon server for
# Windows95 workstations.
; domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
; logon script = %m.bat
# run a specific logon batch file per username
; logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
; logon path = \\%L\Profiles\%U

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
; wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
wins server = 192.168.0.1

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one WINS Server on the network. The default is NO.
; wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
dns proxy = no

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
; preserve case = no
; short preserve case = no
# Default case is normally upper case for all DOS files
; default case = lower
# Be very careful with case sensitivity - it can break things!
; case sensitive = no

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = yes
writable = yes
valid users = %S
create mode = 0664
directory mode = 0775
# If you want users samba doesn't recognize to be mapped to a guest user
; map to guest = bad user


# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = no
printable = yes

# This one is useful for people to share files
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff

# Other examples.
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
; comment = Fred's Printer
; valid users = fred
; path = /home/fred
; printer = freds_printer
; public = no
; writable = no
; printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %U option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
; comment = PC Directories
; path = /usr/local/pc/%m
; public = no
; writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
[public]
; path = /usr/somewhere/else/public
path = /home/downloads
; public = yes
public = yes
; only guest = yes
guest = yes
; writable = yes
writable = yes
; printable = no
printable = yes

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765
 
Old 12-28-2001, 01:05 AM   #2
themarkg
LQ Newbie
 
Registered: Dec 2001
Posts: 8

Rep: Reputation: 0
Angry RH7.2 samba problems too

My setup is one linux box, a Win200 laptop
and a Win98 box. I was running Redhat 7.0
on my linux box and had Samba working
properly across all 3 machines. I've just installed Redhat 7.2 and can't get my
laptop nor Win98 PC to see the linux box.
I can ping the linux box, and I've run
through the fault diagnosis given in
O'Reilly's Samba book and all looks good.

Let me know what you find out.

Mark
 
Old 12-28-2001, 02:35 PM   #3
tarballedtux
Member
 
Registered: Aug 2001
Location: Off the coast of Madadascar
Posts: 498

Rep: Reputation: 30
This confgi should work.

[global]
workgroup = <workgroup name>
netbios name = <netbios name>
server string = Linux Server
encrypt passwords = yes
os level = 1
preferred master = no
domain master = no
hosts allow = <network addresses> #ex: 192.168.0.
[temp]
comment = TMP Directory
path = /tmp
read only = no
browseable = yes
create mask = 0666
directory mask = 0777




This config is general enough to to work.



Hope this works!
 
Old 12-28-2001, 03:09 PM   #4
bluecadet
Member
 
Registered: Oct 2001
Distribution: MD81 RH71
Posts: 555

Rep: Reputation: 30
yeah, don't be scared to make your own smb.conf from scrathc, all the defaults are suitable really, so you only need something evry basic to be up and away.

e.g:

[global]
workgroup = swingyourpants
server string = Samba Server %v
security = share

[homes]
comment = Home Directories
browseable = no
writable = yes

will give any user who logs in their own user area as a share.
 
Old 12-28-2001, 03:27 PM   #5
DMR
Member
 
Registered: Jun 2001
Location: Fairfax, California
Distribution: RH 9.0, RH 7.3, Mandrake 8.0
Posts: 986

Rep: Reputation: 30
Quote:
# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
[public]
; path = /usr/somewhere/else/public
path = /home/downloads
; public = yes
public = yes
; only guest = yes
guest = yes <-- The parameter error is here, should be "only guest"
Although I'm not sure why testparm didn't barf on that.

Last edited by DMR; 12-28-2001 at 03:29 PM.
 
Old 12-28-2001, 05:47 PM   #6
linus
LQ Newbie
 
Registered: Dec 2001
Distribution: Red Hat 7.2
Posts: 20

Rep: Reputation: 0
Have a small network with winxp pro & 98.

I used the following smb.conf with success.

[global]
workgroup = <your workgroup>
netbios name = LINUX
server string = Samba 2.4.5
interfaces = eth0
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printing = bsd
printcap name = /etc/printcap
load printers = yes
dns proxy = no
unix password sync = no
map to guest = never
password level = 0
user name level = 0
null passwords = no
os level = 0
domain master = no
local master = no
preferred master = yes
dead time = 0
debug level = 0
browse list = yes
allow hosts = ALL

[homes]
comment = Home Directories
browseable = yes
allow hosts = ALL
public = yes
read only = no
create mask = 0775
directory mask = 0775
[printers]
comment = All Printers
browseable = yes
path = /temp
printable = yes
public = no
writable = no
create mode = 0700

[netlogon]
comment = Network Logon Service
path = /usr/local/samba/lib/netlogon
guest ok = no
writable = no
share modes = no

[public]
path = /home/public
valid users = @your workgroup
allow hosts = ALL
public = yes
writable = yes
browseable = yes
write list = @your workgroup
max connections = 8
available = yes

This was configured using a combination of responses to one of my questions. Thanks Samba users!
 
Old 12-30-2001, 03:52 AM   #7
themarkg
LQ Newbie
 
Registered: Dec 2001
Posts: 8

Rep: Reputation: 0
Cool Samba with RH7.2

I posted an article saying that my windoze PCs
were not seeing my Samba server under Redhat7.2.
I had just migrated to 7.2 from 7.0 were Samaba
was working correctly.

I did a reinstall of 7.2, but did not configure
any firewall protection since my network is
a segment running behind a firewall. Samba is
working once again. BTW: the default smb.conf
that comes with 7.2 worked fine too, though
it should be edited to add know IPs at least
for security reasons.

Mark
 
Old 01-01-2002, 12:39 PM   #8
tboneshep
LQ Newbie
 
Registered: Dec 2001
Distribution: RH 7.2
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Follow-up and Thanks

Thanks for all your help. I discovered a number of errors I made, and everybody here helped out a bit. I got rid of the database lockup error with one of the smb.conf scripts here. Then, I realized I accepted the defualt IP Chains settings, causing port 137, 138, 139 to be blocked. After changing the port filters, I was able to access the shares. So, thanks again, to everyone!

Happy New Year!
 
  


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/Cups print sharing problems (/var/spool/samba files) Gates1026 Linux - General 9 06-23-2013 02:33 AM
Samba - Connecting from WinXP Pro to Samba running on Debian critical Linux - Networking 1 02-03-2005 10:36 AM
I need the content from thegoldenear.org/toolbox/unices/samba/samba-setup.html rtg2001 Linux - Networking 1 08-05-2004 06:54 PM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 02:21 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 06:54 AM


All times are GMT -5. The time now is 11:43 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration