LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-13-2006, 10:21 PM   #1
ErrorBound
Member
 
Registered: Apr 2006
Posts: 280

Rep: Reputation: 31
Another Samba Problem


I'm trying to configure samba in Kubuntu breezy, using Konqueror I can view the shared files on this machine by typing \\dvorak (this machine's name). However on a windows box, dvorak's icon shows up but can not be accessed ("\\Dvorak server is not accessible. You might not have permission to use this network resource."). On the windows machine, dvorak is displayed as "dvorak server (Samba, Ubuntu)", which was the default value of server string in smb.conf. However in smb.conf, server string is set to "upstairs". I have tried restarting both samba and the windows machine. Also, I cannot access that machine at all from dvorak. Any help is very much appreciated. Here is my smb.conf:



#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = MSHOME
netbios name = dvorak

# server string is the equivalent of the NT Description field
server string = upstairs

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no

# 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 = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast


#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m

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

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
# package for details.
; security = user

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam guest

obey pam restrictions = yes

; guest account = nobody
invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Augustin Luton <aluton@hybrigenics.fr> for
# sending the correct chat script for the passwd program in Debian Potato).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no


########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @ntadmin


######## File sharing ########

# Name mangling options
; preserve case = yes
; short preserve case = yes


############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#======================= Share Definitions =======================

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

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
directory mask = 0700

[~shared]
path = /mnt/aux/~shared
guest ok = yes
case sensitive = no
msdfs proxy = no
 
Old 05-14-2006, 06:52 AM   #2
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Add to your global section:

allow hosts = 127. 192.168.1. MSHOME

Just substitue 192.168.1. for the real ipaddress range of you network. Also check and make sure the firewall is not on, turn it off until your sort out the connection problem, then reactivate it. It's been a while since i've used my samba machine so I'm a little bit out of touch with it.

All so check the permissions on the directories themselves, they need to be set to 0755 for access from everyone
 
Old 05-14-2006, 07:01 AM   #3
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
First, on your samba server make sure you have an account.

smbpasswd -a someuser
You will be prompted for a password, enter it (twice).

BTW, someuser should be a Linux user. Then, execute

smbclient -U someuser -L dvorak

you will be prompted for a password (which you setup above). You should get a list of shares.
Also, if you are using XP or NT machines set

security = user

As I am network admin for Myspa**.com and others and have been up for 36 hours, don't have time to look at your samba config further. But, if this does not get you pointed in the right direction, post back.
 
Old 05-14-2006, 07:15 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Actually, please post back anyway & let us know what happened.
 
Old 05-14-2006, 04:03 PM   #5
ErrorBound
Member
 
Registered: Apr 2006
Posts: 280

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by fotoguy
Add to your global section:

allow hosts = 127. 192.168.1. MSHOME

Just substitue 192.168.1. for the real ipaddress range of you network. Also check and make sure the firewall is not on, turn it off until your sort out the connection problem, then reactivate it.
How do I find the real ip address range? What does an ip address range look like? I have turned the firewall off and I have a samba account.

Also, the windows box is doing strange things, as they tend to do; I turned it off last night and today it can't even find the MSHOME network. Says I may not have permission to access it.
 
Old 05-15-2006, 02:50 AM   #6
BSchindler
Member
 
Registered: May 2006
Location: Los Angeles, CA USA
Distribution: RHAS3, RHAS4, RHEL4, RH6, RH7.2, FC2-7, Gentoo, DSL
Posts: 49

Rep: Reputation: 15
Okay,
I have copied a fully functional smb.conf configuration below. This will work on a mixed OS environment with Win XP and Linux. I actually copied it from a fully functional Samba server which I use ... I stripped out the stuff you do not need.

Go to /etc/samba (as root)
then rename your old file to keep it
>mv smb.conf smb.conf.old

Put the following file in and restart Samba
>/etc/rc.d/init.d/smb restart

Make sure you have a user defined to use Samba
>smbpasswd -a <username>
Put the password in. BTW, is easiest if you have your Linux/Samba user have the same username as your Win XP username.

Code:
#======================= Global Settings =====================================
[global]
	log file = /var/log/samba/%m.log
	load printers = yes
	socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
	dns proxy = no
	cups options = raw
	netbios name = DVORAK
	server string = Test of Samba on DVORAK
	local master = yes
	domain master = yes
	os level = 33
	workgroup = MSHOME
	printcap name = /etc/printcap

#===== These are local settings, make sure you have a Samba account for the user(s) -----
[homes]
	comment = Home Directories
	browseable = no
	writeable = yes

[printers]
	comment = All Printers
	path = /var/spool/samba
	browseable = no
	public = yes
	guest ok = yes
	printable = yes

[CDROM]
	comment = CD/DVD
	path = /media/cdrom
	writable = yes
	browseable = yes
	valid users = wbs
 
Old 05-17-2006, 09:20 PM   #7
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: Custom Debian Live ISO's
Posts: 1,291

Rep: Reputation: 62
Quote:
Originally Posted by ErrorBound
How do I find the real ip address range? What does an ip address range look like? I have turned the firewall off and I have a samba account.

Also, the windows box is doing strange things, as they tend to do; I turned it off last night and today it can't even find the MSHOME network. Says I may not have permission to access it.

To find out what ipaddress is, as root at the command line type:

ifconfig

You should get something similar to this:

eth0 Link encap:Ethernet HWaddr 00:40:F4:6E:641
inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:609 errors:0 dropped:0 overruns:0 frame:0
TX packets:2969 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:522716 (510.4 Kb) TX bytes:240379 (234.7 Kb)
Interrupt:10 Base address:0x4f00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:810 errors:0 dropped:0 overruns:0 frame:0
TX packets:810 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:50066 (48.8 Kb) TX bytes:50066 (48.8 Kb)


This section on eth0 is your ipaddress:

inet addr:10.0.0.1

I'm running a class A network, so that is why I have a 10.0.0.0 address. For my smb.conf it will look something like this:

allow hosts = 10. 127.

You should always include the loopback address for the network card as well, that is why you have the 127. in there. You can also put the workgruop that the computer belongs too. Since most windoze boxes default to either MSHOME or WORKGROUP you can place them in the same line.

If your still insure just type ifconfig at the command line and post the results and I will help your write the `allow hosts` line.
 
  


Reply



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 - Windows XP Problem (//Samba is not accessible) Covenent Linux - Networking 20 08-11-2011 04:07 PM
samba 3 problem - samba PDC can not join to the domain ananthak Linux - Networking 1 05-21-2006 10:39 AM
Samba Problem justintime32 Mandriva 4 02-26-2005 11:28 PM
Samba Problem! Need Help! novkhan Linux - Networking 3 04-30-2004 05:04 PM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 05:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:21 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