LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2005, 03:32 PM   #1
spargonaut
Member
 
Registered: Jun 2004
Distribution: debian etch
Posts: 40

Rep: Reputation: 15
samba config issues: debian and xp


hello all,

what i'm attempting to do is share a file system from a machine running debian with a machine running windows xp.

I can 'see' the server through windows explorer yet cannot access it.
(can't read or write)

the error message i get on the xp box is as follows:
\\Bearly is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.

The network path was not found.

:end error message

i have tried several different smb.conf files and will include the one that seems to work the best.


#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
# $Id: smb.conf,v 1.2.4.6 2002/03/13 18:56:16 peloy Exp $
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not many any basic syntactic
# errors.
#

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

[global]

# Change this for the workgroup/NT-domain name your Samba server will part of
workgroup = RANCHOSNAKE-O

#spargo added these lines
hosts allow = 192.168.1.100

# server string is the equivalent of the NT Description field
# server string = %h server (Samba %v)

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

# You may wish to override the location of the printcap file
; printcap name = /etc/printcap

# 'printing = cups' works nicely
; printing = bsd

; guest account = nobody
invalid users = root

# 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 log though syslog only then set the following
# parameter to 'yes'. Please note that logging through syslog in
# Samba is still experimental.
; syslog only = no

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

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# security_level.txt for details.
; security = user

# 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 = true

# 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

# spargo added the next line
netbios name = BEARLY

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
socket options = TCP_NODELAY

# --- Browser Control Options ---

# Please _read_ BROWSING.txt and set the next four parameters according
# to your network setup. The defaults are specified below (commented
# out.) It's important that you read BROWSING.txt so you don't break
# browsing in your network!

# 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 = yes

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

# 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 = auto

# 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 = auto

# --- End of Browser Control Options ---

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's 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

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

# This boolean parameter controlls whether Samba attempts to sync. the Unix
# password with the SMB password when the encrypted SMB password in the
# /etc/samba/smbpasswd file is changed.
; unix password sync = false

# 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

# 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' &

obey pam restrictions = yes

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

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

[homes]
comment = Home Directories
browseable = no

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
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

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

#spargo commented these next lines out b/c log.smbd says they dont work
;[printers]
; comment = All Printers
; browseable = no
; path = /tmp
; printable = yes
; public = no
; writable = no
; create mode = 0700

#spargo added these line too
[public]
comment = User Public read-only
browsable = yes
path = /mnt/music
printable = no
public = yes
writeable = yes
create mode = 0770

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


questions? comments?
yes, i am somwhat new to samba.
any help is greatly appreciated.
js

Last edited by spargonaut; 03-26-2005 at 03:34 PM.
 
Old 03-26-2005, 03:51 PM   #2
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
Try connecting to \\<ipaddress of ur linux server>

What is the IP address of your windows machine?

I notice that your smb.conf shows hosts allow to 192.168.1.100

lemme know...
 
Old 03-26-2005, 04:02 PM   #3
spargonaut
Member
 
Registered: Jun 2004
Distribution: debian etch
Posts: 40

Original Poster
Rep: Reputation: 15
ip of windows machine = 192.168.1.100
ip of samba machine = 192.168.1.103
ip of internal gateway = 192.168.1.1

i tried: \\192.168.1.103
using the run command on the xp box
and got the message:
\\192.168.1.103
the network path was not found
:end error message

more suggestions? more questions?

thanks.
js

Last edited by spargonaut; 03-26-2005 at 04:09 PM.
 
Old 03-26-2005, 06:31 PM   #4
CM019
Member
 
Registered: Mar 2004
Posts: 58

Rep: Reputation: 15
Hi!

Have you tried setting up a password on debian system using :

smbpasswd -a username

then enter ur password twice to confirm. Then try accessing from winxp and enter the username and password u created.

Hope it helps.
--CM
 
Old 03-26-2005, 06:54 PM   #5
Frank616
Member
 
Registered: Dec 2004
Location: Canada
Distribution: Kubuntu, Fedora
Posts: 56

Rep: Reputation: 16
spargonaut:

Are you using the KDE window manager (I think that is default on most debian based distros). If so, then try the Control Center - network tab. Using the GUI tools is often a lot easier for someone new to Linux than trying to fiddle with configuration files. From the Control Center you should be able to set up a workgroup name, a machine name, and sharing.

Frank.
 
Old 03-26-2005, 08:39 PM   #6
spargonaut
Member
 
Registered: Jun 2004
Distribution: debian etch
Posts: 40

Original Poster
Rep: Reputation: 15
CMO19:
i tried
'smbpasswd -a <username>'
and set it to the same PW as the users PW on the xp box
(user name on each box is identical)
still get the same error.
although it also does not prompt me for a Username or a password.

Frank616:
I'm not using KDE, or any other gui for that matter.
this box is running all konsole.

more info:
I've also checked the signorseal registry on the xp box, it is set to zero
i've also tried to use swat from the xp box, with a web browser using 192.168.1.103:901 as the address with no success.


thanks.
js

Last edited by spargonaut; 03-26-2005 at 08:45 PM.
 
Old 03-26-2005, 09:29 PM   #7
CM019
Member
 
Registered: Mar 2004
Posts: 58

Rep: Reputation: 15
Ok try installing SWAT which is a gui for configuring samba. Type as root:

apt-get install swat

It will ask u whether u want to overwrite smb.conf file. Let it do that and choose yes. It
will ask u again if u want encrypted password choose yes.

Then from mozilla at address bar type:

http://localhost:901/

If it gives an error message then u've to do the following.

Again at commandline type:


vi /etc/inetd.conf

Press Insert on keyboard. And the file should've the following line under services section.
If it isn't there enter it.

swat 901/tcp

And uncomment this line at the end of the file by pressing enter on keyboard after #<off>#


swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat

Now type http://localhost:901/ at the mozilla browser. It will ask for username and password
Type root as username and give the root password. it should present u with a samba
configuration gui. Click on Shares icon at the top after the title samba. Beside the button
CreateShare, type the full path of the folder u wan't to share mine is
home/UserName/folderName.
Then press CreateShare button. Now choose the same folder from the list of top field located
after ChooseShare button. And now press ChooseShare button. Now press on GLOBALS icon
at the top and click on CommitChanges(this will save ur changes). That's it. NOw close
the window. Restart Winxp and Debian computer. You should now be able to access from Winxp.
if not try using smbpasswd again.

My system is debian sarge rc2 and it works for me. If u 've any problem post back.

--CM
 
Old 03-26-2005, 09:43 PM   #8
CM019
Member
 
Registered: Mar 2004
Posts: 58

Rep: Reputation: 15
There's a mistake. My sharedFolder is /home/userName/FolderName not

home/userName/FolderName
Sorry.

--CM
 
Old 03-26-2005, 09:53 PM   #9
CM019
Member
 
Registered: Mar 2004
Posts: 58

Rep: Reputation: 15
And also if u wanna save ur edit of a file with vi press ESC key on keyboard and holding down shift key press Z key twice.

--CM
 
Old 03-26-2005, 11:33 PM   #10
spargonaut
Member
 
Registered: Jun 2004
Distribution: debian etch
Posts: 40

Original Poster
Rep: Reputation: 15
CM019:
( post #7)

did this:

>Ok try installing SWAT which is a gui for configuring samba. Type as root:

>apt-get install swat

and then the linux box returned to a prompt.
[actually, swat was already installed, so i apt-get remove'd it, then reinstalled it (apt-get install swat)]

This did not happen:
>It will ask u whether u want to overwrite smb.conf file. Let it do that and choose yes. It
>will ask u again if u want encrypted password choose yes.



did this:

>Then from mozilla at address bar type:

>http://localhost:901/


and got an error message
message:
the connection was refused when attempting to contact192.168.1.103:901
:end message

so, i did this:

>If it gives an error message then u've to do the following.
>Again at commandline type:
>vi /etc/inetd.conf


but i couldn't find this:

>Press Insert on keyboard. And the file should've the following line under services section.
>If it isn't there enter it.
>swat 901/tcp


but i did do this:

>And uncomment this line at the end of the file by pressing enter on keyboard after #<off>#
>swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat


then i restarted the linux box. logged on with ssh, and did this:

>Now type http://localhost:901/ at the mozilla browser. It will ask for username and password
>Type root as username and give the root password. it should present u with a samba
>configuration gui. Click on Shares icon at the top after the title samba. Beside the button
>CreateShare, type the full path of the folder u wan't to share mine is
>home/UserName/folderName.
>Then press CreateShare button. Now choose the same folder from the list of top field located
>after ChooseShare button. And now press ChooseShare button. Now press on GLOBALS icon
>at the top and click on CommitChanges(this will save ur changes). That's it. NOw close
>the window. Restart Winxp and Debian computer. You should now be able to access from Winxp.


did all that and still cannot access the share.
this time, i can only see the workgroup, and if i try to access the workgroup, i get the
error message:
Ranchosnake-o is not accessible. You might not have permission to use this netowrk resource.
contact the administrator of this server to find out if you have access permissions.

the network path was not found.
:end error message

not sure what to do with this.

>if not try using smbpasswd again.

I have already used the command 'smbpasswd spargonaut'
and entered the password, using the same PW that i use to log into the xp box.
i have done this both before and after following your suggestions.


i was making progress with your suggestions, (or at least i thought i was) yet have seem to hit another brick wall.
got more suggestions?

thanks!
js

my new smb.conf file:

# Samba config file created using SWAT
# from 192.168.1.100 (192.168.1.100)
# Date: 2005/03/26 23:15:47

# Global parameters
[global]
workgroup = RANCHOSNAKE-O
netbios name = BEARLY
server string = music for the ranch
obey pam restrictions = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
invalid users = root
hosts allow = 192.168.1.100

[homes]
comment = Home Directories
create mask = 0700
directory mask = 0700
browseable = No

[public]
comment = User Public read-only
path = /mnt/music
read only = No
create mask = 0770
guest ok = Yes

[/mnt/music]
path = /tmp
read only = No
guest ok = Yes
 
Old 03-26-2005, 11:37 PM   #11
spargonaut
Member
 
Registered: Jun 2004
Distribution: debian etch
Posts: 40

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by spargonaut

did all that and still cannot access the share.
this time, i can only see the workgroup, and if i try to access the workgroup, i get the
error message:
Ranchosnake-o is not accessible. You might not have permission to use this netowrk resource.
contact the administrator of this server to find out if you have access permissions.

the network path was not found.
:end error message
correction:
i can access the workgroup, and i can 'see' the server, yet i still cannot access it, getting the same error message as above

js
 
Old 03-27-2005, 12:36 AM   #12
CM019
Member
 
Registered: Mar 2004
Posts: 58

Rep: Reputation: 15
Ok first of all enter the line if it's not at the file /etc/inetd.conf:

swat 901/tcp

before the line

swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat

And save it.
Now restart debian computer. Again configure the swat as i've told u on my last post
this time use Mozilla cause it's easy to use. And u want to share /mnt/music is that
a harddrive or cdrom at /mnt? If it is
a harddrive have u mounted it ( because /mnt folder shows only mounted devices as file
system). If it's not mounted use the mount command.

and also have u set up proper permission using chmod command? If not do this as root:

chmod 755 /mnt/music

Another thing is ur winxp machine behind any kind of firewall? If yes you might
've to give access for ur debian machine. Or if u 've a firewall for debian you might 've
to give access for ur windows system.

If everything fails try doin the same thing by creating a folder at a user's home dir
(as i've showed earlier) and post back.

--CM
 
Old 03-27-2005, 12:57 AM   #13
CM019
Member
 
Registered: Mar 2004
Posts: 58

Rep: Reputation: 15
By the way don't reinstall swat as u've already 've it.

---CM
 
Old 03-27-2005, 08:54 AM   #14
spargonaut
Member
 
Registered: Jun 2004
Distribution: debian etch
Posts: 40

Original Poster
Rep: Reputation: 15
ok, i did this:


>Ok first of all enter the line if it's not at the file /etc/inetd.conf:
>
>swat 901/tcp
>
>before the line
>
>swat stream tcp nowait.400 root /usr/sbin/tcpd /usr/sbin/swat
>
>And save it.
>
i wasn't sure how far before that 'swat stream tcp...' i should put it, so i just put it
before: '#:OTHER: Other services' which is the section i found 'swat stream tcp...' in.

next, i did this:

>Now restart debian computer. Again configure the swat as i've told u on my last post
>this time use Mozilla cause it's easy to use. And u want to share /mnt/music is that
>a harddrive or cdrom at /mnt?

it is another HD partition. I have already added the mount command to fstab and it mounts
the partition on startup

>If it is
>a harddrive have u mounted it ( because /mnt folder shows only mounted devices as file
>system). If it's not mounted use the mount command.


i thought this might be the problem:

>and also have u set up proper permission using chmod command? If not do this as root:

>chmod 755 /mnt/music


but after checking, have found that the permissions
for this folder are already rwxr-xr-x. good suggestion, i hadn't thought of that yet.
sometimes, its the simplest stuff we overlook. too bad this wasn't the fix.


>Another thing is ur winxp machine behind any kind of firewall? If yes you might
>'ve to give access for ur debian machine. Or if u 've a firewall for debian you might 've
>to give access for ur windows system.

nope, their both behind the same firewall (which is actually just a linksys router).
the xp box has a software firewall, but i usually monitor it pretty closely, so i don't think
its causing the problem.

>If everything fails try doin the same thing by creating a folder at a user's home dir
>(as i've showed earlier) and post back.

still fails. same error message as above: network path is not found. :end
so, per your instruction, i created another share in the user's home directory
and still no love.

btw, thanks for all your attention, i really aappreciate it.

js
 
Old 03-27-2005, 09:32 AM   #15
miguel102383
LQ Newbie
 
Registered: Mar 2005
Location: San Antonio, Texas
Posts: 5

Rep: Reputation: 0
maybe you can try using a very simple configuration file and starting from scratch.
something like:
Code:
[global]
    workgroup = <workgroup name> 
[test] 
    comment = For testing only
    path = /path/to/testShare
    read only = no
    guest ok = yes
also don't forget to set the ownership of the shared directory to the username you are trying to use to login.
you might also want to look into using webmin
 
  


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
Sendmail - Config for IP Block's & Config Issues Thom_Redhat Linux - Software 1 04-07-2006 01:29 PM
several config issues admbig Slackware 8 02-20-2005 06:15 AM
Webmin cannot handle Samba config files that use the config or include directives allelopath Linux - Networking 3 01-18-2005 09:36 AM
possible samba config problem or network config issue? rruffin Linux - Networking 3 06-03-2003 04:04 PM
RedHat 8 Samba config issues bjshaw Linux - Networking 51 02-19-2003 07:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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