LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 06-14-2009, 12:55 PM   #1
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Rep: Reputation: 0
Question Samba issues - Fedora 10 - win xp home


Here is the setup.

I have three computers always running in my house with others that come and go (laptops of friends).


Computer 1 has xp home
Computer 2 has xp home
Computer 3 is running Fedora 10 and is my web server

All the computers are hooked into a Lynksys router (WRT54G).

We put samba on the server so I can edit my website from my pc, to make life easier.

About a week ago my friend and I got everything working fine. It was a pain in the ass to do so, but finally it worked.

Two days ago my net went out. Thinking it was comcast I reset my modem. That did not work. I then unplugged my router and waited 30 seconds and plugged it back in. That ended up working.

But then I got a wonderful windows error saying that two computers on my network have the same IP address. I restart my computer and it went away. Ok, simple enough.

I then go to my website and the site would not load. I go to my server and it had froze. I don't quite get that. I rebooted it. Ok, its working...except I still could not get to my website. I check the ifconfig and the ip address changed from 192.168.1.103 to 192.168.1.101.

Simple fix, I changed setting in my router and now the site is viewable again.

I noticed that what was the IP of the serveris now the IP of my pc (192.168.1.103)

I went upstairs to change up the website a bit and found out that my server is not viewable from My Computer like it once was.

Note that no changes to the samba config has changed.

I tried to do

Code:
net use m: \\localhost\share
but I got this error

Code:
C:\>net use m: \\localhost\share
System error 64 has occurred.

The specified network name is no longer available.
I check net view –

The specified network name is no longer available.


Code:
C:\>net view
Server Name            Remark

-------------------------------------------------------------------------------
\\LOCALHOST            Samba Server Version 3.2.11-0.30.fc10
\\PEANUT
\\TURBODOG
The command completed successfully.

Is there something that I am forgetting? How do I get it working again? Thanks in advance for the help.

Here is my samba config.

Code:
# 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 (perhaps too
# many!) most of which are not shown in this example
#
# For a step to step guide on installing, configuring and using samba, 
# read the Samba-HOWTO-Collection. This may be obtained from:
#  http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
#
# Many working examples of smb.conf files can be found in the 
# Samba-Guide which is generated daily and can be downloaded from: 
#  http://www.samba.org/samba/docs/Samba-Guide.pdf
#
# 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 commentry 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 made any basic syntactic errors. 
#
#---------------
# SELINUX NOTES:
#
# If you want to use the useradd/groupadd family of binaries please run:
# setsebool -P samba_domain_controller on
#
# If you want to share home directories via samba please run:
# setsebool -P samba_enable_home_dirs on
#
# If you create a new directory you want to share you should mark it as
# "samba-share_t" so that selinux will let you write into it.
# Make sure not to do that on system directories as they may already have
# been marked with othe SELinux labels.
#
# Use ls -ldZ /path to see which context a directory has
#
# Set labels only on directories you created!
# To set a label use the following: chcon -t samba_share_t /path
#
# If you need to share a system created directory you can use one of the
# following (read-only/read-write):
# setsebool -P samba_export_all_ro on
# or
# setsebool -P samba_export_all_rw on
#
# If you want to run scripts (preexec/root prexec/print command/...) please
# put them into the /var/lib/samba/scripts directory so that smbd will be
# allowed to run them.
# Make sure you COPY them and not MOVE them so that the right SELinux context
# is applied, to check all is ok use restorecon -R -v /var/lib/samba/scripts
#
#--------------
#
#======================= Global Settings =====================================
	
[global]
	
# ----------------------- Netwrok Related Options -------------------------
#
# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
#
# server string is the equivalent of the NT Description field
#
# netbios name can be used to specify a server name not tied to the hostname
#
# Interfaces lets you configure Samba to use multiple interfaces
# If you have multiple network interfaces then you can list the ones
# you want to listen on (never omit localhost)
#
# Hosts Allow/Hosts Deny lets you restrict who can connect, and you can
# specifiy it as a per share option as well
#
	workgroup = MSHOME
	server string = Samba Server Version %v
	
;	netbios name = MYSERVER
	
;	interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24 
;	hosts allow = 127. 192.168.12. 192.168.13.
	
# --------------------------- Logging Options -----------------------------
#
# Log File let you specify where to put logs and how to split them up.
#
# Max Log Size let you specify the max size log files should reach
	
	# logs split per machine
	log file = /var/log/samba/log.%m
	# max 50KB per log file, then rotate
	max log size = 50
	
# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should 
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
# compatibility. tdbsam requires no further configuration.

;	security = user
;	passdb backend = tdbsam


# ----------------------- Domain Members Options ------------------------
#
# Security must be set to domain or ads
#
# Use the realm option only with security = ads
# Specifies the Active Directory realm the host is part of
#
# Backend to store user information in. New installations should 
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
# compatibility. tdbsam requires no further configuration.
#
# Use password server option only with security = server or if you can't
# use the DNS to locate Domain Controllers
# The argument list may include:
#   password server = My_PDC_Name [My_BDC_Name] [My_Next_BDC_Name]
# or to auto-locate the domain controller/s
#   password server = *
	
	
;	security = domain
;	passdb backend = tdbsam
;	realm = MY_REALM

;	password server = <NT-Server-Name>

# ----------------------- Domain Controller Options ------------------------
#
# Security must be set to user for domain controllers
#
# Backend to store user information in. New installations should 
# use either tdbsam or ldapsam. smbpasswd is available for backwards 
# compatibility. tdbsam requires no further configuration.
#
# 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 Logons let Samba be a domain logon server for Windows workstations. 
#
# Logon Scrpit let yuou specify a script to be run at login time on the client
# You need to provide it in a share called NETLOGON
#
# Logon Path let you specify where user profiles are stored (UNC path)
#
# Various scripts can be used on a domain controller or stand-alone
# machine to add or delete corresponding unix accounts
#
;	security = user
;	passdb backend = tdbsam
	
;	domain master = yes 
;	domain logons = yes
	
	# the login script name depends on the machine name
;	logon script = %m.bat
	# the login script name depends on the unix user used
;	logon script = %u.bat
;	logon path = \\%L\Profiles\%u
	# disables profiles support by specifing an empty path
;	logon path =          
	
;	add user script = /usr/sbin/useradd "%u" -n -g users
;	add group script = /usr/sbin/groupadd "%g"
;	add machine script = /usr/sbin/useradd -n -c "Workstation (%u)" -M -d /nohome -s /bin/false "%u"
;	delete user script = /usr/sbin/userdel "%u"
;	delete user from group script = /usr/sbin/userdel "%u" "%g"
;	delete group script = /usr/sbin/groupdel "%g"
	
	
# ----------------------- 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
#
# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
#
# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;	local master = no
;	os level = 33
;	preferred master = yes
	
#----------------------------- Name Resolution -------------------------------
# Windows Internet Name Serving Support Section:
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
#
# - WINS Support: Tells the NMBD component of Samba to enable it's WINS Server
#
# - WINS Server: Tells the NMBD components of Samba to be a WINS Client
#
# - 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.
#
# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups.
	
;	wins support = yes
;	wins server = w.x.y.z
;	wins proxy = yes
	
;	dns proxy = yes
	
# --------------------------- Printing Options -----------------------------
#
# Load Printers let you load automatically the list of printers rather
# than setting them up individually
#
# Cups Options let you pass the cups libs custom options, setting it to raw
# for example will let you use drivers on your Windows clients
#
# Printcap Name let you specify an alternative printcap file
#
# You can choose a non default printing system using the Printing option
	
	load printers = yes
	cups options = raw

;	printcap name = /etc/printcap
	#obtain list of printers automatically on SystemV
;	printcap name = lpstat
;	printing = cups

# --------------------------- Filesystem Options ---------------------------
#
# The following options can be uncommented if the filesystem supports
# Extended Attributes and they are enabled (usually by the mount option
# user_xattr). Thess options will let the admin store the DOS attributes
# in an EA and make samba not mess with the permission bits.
#
# Note: these options can also be set just per share, setting them in global
# makes them the default for all shares

;	map archive = no
;	map hidden = no
;	map read only = no
;	map system = no
;	store dos attributes = yes


#============================ Share Definitions ==============================
	
[share]
	comment = Website
	path = /var/www/html
	writable = yes
	browseable = yes

[homes]
	comment = Home Directories
	browseable = yes
	writable = yes
;	valid users = %S
;	valid users = MYDOMAIN\%S
	
[printers]
	comment = All Printers
	path = /var/spool/samba
	browseable = no
	guest ok = no
	writable = no
	printable = yes
	
# Un-comment the following and create the netlogon directory for Domain Logons
;	[netlogon]
;	comment = Network Logon Service
;	path = /var/lib/samba/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 = /var/lib/samba/profiles
;	browseable = no
;	guest ok = 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

Last edited by revlo; 06-14-2009 at 01:49 PM.
 
Old 06-14-2009, 01:29 PM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,214

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
For the machines that are there all the time, change them to fixed IP addressing, update the 'hosts' file to reflect the fixed addressing.

For the machines that come and go, I would suggest you look into the router config, and see if you can assign IP addresses based on MAC address. Many routers are capable of this. Then you will know who has what address, and the 'hosts' files will be correct.

Static IP addressing is much less trouble, with any server.

I have found my servers are easier to find, and faster when I set in the Global section:

Quote:
wins support = Yes
You can go into the windbloze and tell it the name of the wins server. Then the hosts find the shares much faster.
 
Old 06-14-2009, 01:53 PM   #3
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camorri View Post
For the machines that are there all the time, change them to fixed IP addressing, update the 'hosts' file to reflect the fixed addressing.

For the machines that come and go, I would suggest you look into the router config, and see if you can assign IP addresses based on MAC address. Many routers are capable of this. Then you will know who has what address, and the 'hosts' files will be correct.

Static IP addressing is much less trouble, with any server.

I have found my servers are easier to find, and faster when I set in the Global section:



You can go into the windbloze and tell it the name of the wins server. Then the hosts find the shares much faster.
This did not change anything at all. I still get the errors

Keep in mind that I am still new to the whole linux world.

Any other suggestions?
 
Old 06-14-2009, 02:45 PM   #4
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
To clarify, I can see the server when I view my workgroup computers, I just am unable to access anything on the server. I can not access the files to edit my website that I was once able to access.
 
Old 06-14-2009, 02:52 PM   #5
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,979
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by revlo View Post
This did not change anything at all. I still get the errors

Keep in mind that I am still new to the whole linux world.

Any other suggestions?
Is SELinux enabled?

If you want /var/www/html shared you probably need to...

Code:
root@host# chcon -t samba_share_t /var/www/html
Also you probably need to do this...
Code:
root@host# setsebool -P samba_export_all_rw on
FWIW if you don't care to use SELinux you probably want to disable it under /etc/sysconfig/selinux and reboot.

Another thing to look at is if your firewall is enabled? Is it? Did you open the right ports?

If you want to test (without disabling anything) you can do this...
Code:
root@host# setenforce 0
root@host# iptables -F
root@host# service smb restart
Then test it..

-C

Last edited by custangro; 06-14-2009 at 03:04 PM.
 
Old 06-14-2009, 03:12 PM   #6
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
I did both of those and it's still not working.

The firewall is has the same settings it did before and seems to check out ok.

SELinux is in permissive mode just like it was when we set it up before.
 
Old 06-14-2009, 04:05 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
samba by default uses the computers hostname (looks like localhost in your case) for the netbios name. By trying to select localhost you are really accessing the computer you are sitting in front of instead of the server itself. I see you commented out the netbios name = myserver in the smb.conf file. Its interesting that you said it was working before. I would assume you commented out the line but did not restart the computer or samba.

Remove the comment (netbios name = MYSERVER) and restart samba. You should be able to access the server again.

BTW what settings are you changing in the router.
 
Old 06-14-2009, 04:22 PM   #8
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Still does not work.

and we always restarted samba after every change.

as for the router -

http://i7.photobucket.com/albums/y27...gan/router.jpg
 
Old 06-14-2009, 04:28 PM   #9
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
and not sure if the following error would help any -

http://i7.photobucket.com/albums/y27...ogan/error.jpg


again thanks for helping me.
 
Old 06-14-2009, 04:29 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Does myserver appear in network neighborhood?
Can you see the shares via
net view \\myserver on the windows PCs?
or
smbclient -L myserver on the server? (Just press enter at the password prompt)
 
Old 06-14-2009, 04:39 PM   #11
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
Does myserver appear in network neighborhood?
Can you see the shares via
net view \\myserver on the windows PCs?
or
smbclient -L myserver on the server? (Just press enter at the password prompt)
it does not apear in network neighborhood.

this is what I get from the command line -


Code:
C:\>net view \\myserver
System error 53 has occurred.

The network path was not found.
C:\>

C:\>net view \\localhost
System error 52 has occurred.

You were not connected because a duplicate name exists on the network. Go to System in Control Panel to change the computer name and try again.
C:\>
and this is what i get from the server -

Code:
[root@localhost ~]# smbclient -L myserver
Connection to myserver failed (Error NT_STATUS_BAD_NETWORK_NAME)


[root@localhost ~]# smbclient -L localhost
Enter root's password: 
session setup failed: NT_STATUS_LOGON_FAILURE
I know the password is correct. So not sure why its giving me that error.
 
Old 06-14-2009, 04:47 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Try entering the root password at the prompt. Not familiar with Fedora enough. It appears that the netbios name is still localhost.
 
Old 06-14-2009, 04:48 PM   #13
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
Yeah..I tired that to, still no luck
 
Old 06-14-2009, 04:51 PM   #14
revlo
LQ Newbie
 
Registered: Jun 2009
Posts: 16

Original Poster
Rep: Reputation: 0
apparently it did not want a password o.0


Code:
[root@localhost ~]# smbclient -L localhost
Enter root's password: 
Anonymous login successful
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.2.11-0.30.fc10]

	Sharename       Type      Comment
	---------       ----      -------
	share           Disk      Website
	homes           Disk      Home Directories
	IPC$            IPC       IPC Service (Samba Server Version 3.2.11-0.30.fc10)
Anonymous login successful
Domain=[MSHOME] OS=[Unix] Server=[Samba 3.2.11-0.30.fc10]

	Server               Comment
	---------            -------
	LOCALHOST            Samba Server Version 3.2.11-0.30.fc10
	PEANUT               
	TURBODOG             

	Workgroup            Master
	---------            -------
	MSHOME               LOCALHOST
[root@localhost ~]#
 
Old 06-14-2009, 04:58 PM   #15
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
LOCALHOST Samba Server Version 3.2.11-0.30.fc10
The netbios name is still localhost. You need to uncomment the netbios name = myserver in the smb.conf file and restart samba.
 
  


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
win xp home edition and samba home shares scheidel21 Linux - Software 8 10-09-2008 12:47 AM
samba, netbios-ssn and a chatty win xp home box. checkmate3001 Linux - Server 1 09-13-2008 04:58 PM
Samba and Print issues on home network dcabernel Linux - Networking 2 10-09-2006 09:36 PM
Samba and Win XP Speed Issues wdingus Linux - Networking 2 10-19-2003 04:14 AM
Samba & WIN XP Home pid79 Linux - Networking 1 03-18-2003 12:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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