Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
[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
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
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.
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.
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
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:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.