LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2003, 03:22 AM   #1
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Rep: Reputation: 15
Question Samba problem


I've been struggling to set up a samba server for the past few days. I first did it from the GUI based samba setup utility in KDE, it didn't work. Then I looked on the web and got as much information as I could and tried doing it manually. Then I reinstalled RH 9 and it still doesn't work. Please please help.

This is the error message I get when I try to access from my windowz network neighborhood.

"myworkgroup is not available. 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 list of servers for this workgroup is not currently available."

Someone please help.....

Thanks

p.s. I'm running a very basic network. My laptop and my linux box both are connected to a router, which is connected to my cable modem.
 
Old 09-15-2003, 03:25 AM   #2
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Ubuntu 10 And Linux Mint
Posts: 414

Rep: Reputation: 30
a smb.conf will good enough for us to try to help you solve your problem.

Please post your smb.conf
 
Old 09-15-2003, 04:23 AM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Hi,

I had a similar problem, I turned off the firewall and it worked straight away.

service iptables stop

>Craig
 
Old 09-16-2003, 02:12 AM   #4
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
Thanx to everyone...... here's the smb.conf file. Hope it helps

[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = mygroup

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

# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127.


printcap name = /etc/printcap
load printers = yes


printcap name = /etc/printcap
load printers = yes

printing = cups


log file = /var/log/samba/%m.log

# Put a capping on the size of the log files (in Kb).
max log size = 0
# Do not enable this option unless you have read those documents
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd

# The following is needed to keep smbclient from spouting spurious errors
# when Samba is built with support for SSL.
; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt


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*

pam password change = yes

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# 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 = /etc/samba/smb.conf.%m


obey pam restrictions = yes


socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# this has been changed in version 1.9.18 to no.
username map = /etc/samba/smbusers
guest ok = yes
dns proxy = no

#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writeable = 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

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
printable = yes

[[shared]
comment = Shared drive
path = /mnt/data/shared
writeable = yes
valid users = root tazin
public = no
printable = no
create mask = 0765
 
Old 09-16-2003, 11:30 AM   #5
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
I still can't make samba work...please help
 
Old 09-16-2003, 12:06 PM   #6
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Well the first thing I see is that the error message you are getting says that "myworkgroup" is not available. In your smb.conf file you have:

workgroup=mygroup

so either change the workgroup in Windows or change the workgroup in smb.conf. Both the client and the server must be in the same workgroup in order for samba to work.
 
Old 09-16-2003, 09:42 PM   #7
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
That's a typo. I have it same in both windows and linux. But still not working. Please help...


Thanx to RealDeal, but I don't know if I should turn off my firewall or not.
 
Old 09-17-2003, 06:40 PM   #8
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
I reinstalled windows and linux again, and set up samba. But it's still giving me the same error.
please help....this is driving me crazy...

thanks
 
Old 09-17-2003, 06:54 PM   #9
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Hi Green,

Why don't you turn off your firewall just to test? Even if it is only for a minute or two. If it works (which it did for me) at least you know why it isn't working. Then you can look into setting up iptables to allow samba connections.

service iptables stop
service smb restart

see if it works, if you still get the same prob, service iptables start.

Seeya
>Craig
 
Old 09-17-2003, 07:12 PM   #10
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Hi again,

Here is the smb.conf file that I am actively using. Why don't you back your file up, and use this one. Obviously edit the lines to point to your workgroup and users etc.

===============================================
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = support

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

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
hosts allow = 10.113.

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
printcap name = /etc/printcap
load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest

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

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

# Use password server option only with security = server
# 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 = *
; password server = <NT-Server-Name>

# 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 is needed to keep smbclient from spouting spurious errors
# when Samba is built with support for SSL.
; ssl CA certFile = /usr/share/ssl/certs/ca-bundle.crt

# The following are needed to allow password changing from Windows to
# update the Linux system 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*

# You can use PAM's password change control flag for Samba. If
# enabled, then PAM will be used for password changes when requested
# by an SMB client instead of the program listed in passwd program.
# It should be possible to enable this without changing your passwd
# chat parameter for most setups.

pam password change = yes

# Unix users can map to different SMB User names
; username map = /etc/samba/smbusers

# 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 = /etc/samba/smb.conf.%m

# This parameter will control whether or not Samba should obey PAM's
# account and session management directives. The default behavior is
# to use PAM for clear text authentication only and to ignore any
# account or session management. Note that Samba always ignores PAM
# for authentication in the case of encrypt passwords = yes

obey pam restrictions = yes

# 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.1.255 192.168.2.44

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

# 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.
username map = /etc/samba/smbusers
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 ==============================
[mpg]
comment = mpg's
path = /bigred/mpg
writeable = yes
valid users = alex, ben, craig, joshu, justin, michael
printable = no
admin users = justin, joshu, craig

[upload]
path = /bigred/upload
writeable = yes
comment = upload
valid users = alex, ben, craig, joshu, justin, michael
admin users = justin, joshu, craig

===================================================

Hope this helps.

My machine is set up basically as a simple file server, nothing fancy.

>Craig
 
Old 09-17-2003, 09:24 PM   #11
gizmogadgetus
Member
 
Registered: Aug 2003
Location: Texas
Distribution: Fedora Core 2
Posts: 71

Rep: Reputation: 15
Just a random thought, but are you able to ping your laptop from your linux machine? If you can read on...

If you're receiving the error message you listed in windows, you'll want to make sure that your using "share" level security rather than "user" level security. This may help you get access to the samba shares. There are some strange things that can happen when you try to link a windows user/and a linux user without some domain knowledge.

Also, in the hosts allow, it looks like your localhost ip is truncated. it should be 127.0.0.1.
 
Old 09-17-2003, 10:33 PM   #12
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
RaelDeal,
Tried that. stopped firewall and restarted samba. didn't work. I'm getting the same messege again.
 
Old 09-17-2003, 10:38 PM   #13
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
does doing start-run-"\\<samba server name>" in the windows box give you the same error or asks you for username and password?
 
Old 09-17-2003, 11:32 PM   #14
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
is that the workgroup name? I tried that and it says network not found...not the same error
 
Old 09-17-2003, 11:33 PM   #15
thegreenearth
Member
 
Registered: Nov 2001
Location: TX, USA
Distribution: Redhat 7.1
Posts: 31

Original Poster
Rep: Reputation: 15
I also tried with the server hostname, same error....network not found
 
  


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. bruse Linux - Networking 1 08-13-2005 10:08 AM
Samba Problem tied2 Linux - Newbie 5 06-17-2002 09:41 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 - Newbie

All times are GMT -5. The time now is 01:33 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
Open Source Consulting | Domain Registration