LinuxQuestions.org
Help answer threads with 0 replies.
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 01-14-2004, 04:33 AM   #1
vikram_cvk
Member
 
Registered: Jan 2004
Location: Hyderabad , India
Distribution: RHL 9
Posts: 42

Rep: Reputation: 15
Samba:Unable to connect shares from win2k client


Hello Experts ,
I have a win 2000 network of 10 pc's . tryin to make one of the system as Linux file / print server .Installed Samba on RHL 9 (during os installation) .


From win 2k client i'm able to see Linux-server (netbios name) ,even able to view general share (but unable to write to this share inspite of 'writable = yes '

But unable to get into 'homes' share

I'm getting the following errors

On Linux-server
---------------
$smbclient //Linux-server/home


added interface ip=202.88.223.10 bcast=202.88.223.255 nmask=255.255.255.0

Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.7a]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME



On Win2k client
---------------
when i click on home share system prompts for username/password , when i enter the username/password it says invalid username/password



I made extensive search on the net , to some extent i could narrow down the problem but solutions is still elusive

One more interesting thing is if i change 'security' parameter in the global section from share to 'user' or 'server' then I cant even enter into the Linux-server folder in network neighbourhood


On Linux-server i did the following
-----------------------------
@ created samba password file
@ Also added usernames to smbpassword file ($ smbpasswd -a <linux user name>)
@ changed file/directory mode to 777 ( $chmod 777 /home )
@ disabled firewall ( $service iptables stop )
@

On win 2k client i did the following
----------------------------

@ Added ip address of Linux-server in wins option of tcp/ip advance settings

@ Added Linux-server in lmhosts file
@ created same usernames & passwords as in linux-server





smb.conf file
--------------



[global]
netbios name = linux-server
workgroup = WORKGROUP
server string = Samba Server
hosts allow = 202.88.223. 127.
printcap name = /etc/printcap
load printers = yes
printing = cups
log file = /var/log/samba/%m.log
security = share
encrypt passwords = yes
smb passwd file = /usr/local/samba/private/smbpasswd



#========= Share Definitions ===========
[homes]
comment = Home Directories
browseable = yes
writable = yes

[general]

comment = Directories that are available 4 all users
path = /share
guest ok = yes
writable = yes
browsable = yes
read only = no
public = yes


----------------------------------------------------

What is the problem , I'm breaking my head from the past 2 days

It would be act of kindness if ne of u can tell me the solution for this problem .

Thanking You,
vIks.
 
Old 01-14-2004, 06:12 AM   #2
jimsoar
LQ Newbie
 
Registered: Jan 2004
Location: Brisbane QLD Australia
Distribution: Mandrake 9.2 RC1 AMD64 and mandrake 9.2 normal
Posts: 2

Rep: Reputation: 0
Have you created user accounts on your linux box and have you encrypted the passwords eg login as root and type smbpasswd "username" and enter the password for that user.

Alternatively use webmin www.webmin.org to manage passwords

Hope this helps
 
Old 01-14-2004, 06:19 AM   #3
jimsoar
LQ Newbie
 
Registered: Jan 2004
Location: Brisbane QLD Australia
Distribution: Mandrake 9.2 RC1 AMD64 and mandrake 9.2 normal
Posts: 2

Rep: Reputation: 0
Sorry also for your other problem ensure that the linux directory that you are sharing is writeable form linux eg

ls -l

drwxrwxr-x 2 root users 4096 Jan 14 22:15 share/

if you created the share as root normal permissions would be

drwxr-xr-x 2 root root 4096 Jan 14 22:15 share/

change it by the following

chown root.user share
chmod 775 share

will make the share writeable by users but not guests unless you force the user group using the force group option or something similar

Hope this helps
 
Old 01-14-2004, 07:53 PM   #4
vikram_cvk
Member
 
Registered: Jan 2004
Location: Hyderabad , India
Distribution: RHL 9
Posts: 42

Original Poster
Rep: Reputation: 15
hi ,
Thx for showing interest in my prob !
I have already done '$ smbpasswd -a <username>' but still the prob persists

Abt the permissions to share folder i'll try what u have suggested

plz try to further grope into the prob
 
Old 03-21-2004, 04:25 PM   #5
rajbaxi
Member
 
Registered: Jul 2003
Location: MI
Distribution: redhat,mandrake,debian
Posts: 68

Rep: Reputation: 15
Please post your smb.conf file.
 
Old 03-21-2004, 04:31 PM   #6
noeffort
LQ Newbie
 
Registered: Feb 2004
Posts: 27

Rep: Reputation: 15
In your Win2k environment, you are not using a domain controller, are you?

if so WORKGROUP as a workgroup will not work. it has to match the name of the domain...

as was stated above, webmin helps immensely

To answer the very first problem:

---------------
$smbclient //Linux-server/home

added interface ip=202.88.223.10 bcast=202.88.223.255 nmask=255.255.255.0

Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.7a]
tree connect failed: NT_STATUS_BAD_NETWORK_NAME
__________
tree connect failed because on the linux side of using smbclient, your spelled Linux-server with a capital L. try //linux-server/home
and pass the username and password in that command or else it doesnt know which share to connect to...

Last edited by noeffort; 03-21-2004 at 04:34 PM.
 
Old 03-22-2004, 12:01 AM   #7
rajbaxi
Member
 
Registered: Jul 2003
Location: MI
Distribution: redhat,mandrake,debian
Posts: 68

Rep: Reputation: 15
have you done 'smbpasswd username'?
 
Old 03-22-2004, 12:05 AM   #8
rajbaxi
Member
 
Registered: Jul 2003
Location: MI
Distribution: redhat,mandrake,debian
Posts: 68

Rep: Reputation: 15
pass the username and password in that command or else it doesnt know which share to connect to...

alternatively you can opt out the username and password if you are logged in as a user that exists in the smbpasswd database.

[root@hostname ]# smbclient //hostname/share
added interface ip=192.168.1.253 bcast=192.168.1.255 nmask=255.255.255.0
Password:
Domain=[DOMAIN] OS=[Unix] Server=[Samba 2.2.5]
smb: \>
 
Old 03-22-2004, 12:14 AM   #9
rajbaxi
Member
 
Registered: Jul 2003
Location: MI
Distribution: redhat,mandrake,debian
Posts: 68

Rep: Reputation: 15
Here is my smb.conf. My samba server is a Domain Controller.
[global]

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

# server string is the equivalent of the NT Description field
; server string = Raj's Samba Server
server string = %h server (Samba %v)

# 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 = 192.168.1. 192.168.2. 127.
hosts allow = 192.168.1. 127.0.0.1

# 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.
security = user
;security = server

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

# 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

# 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 = yes
;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
;domain master = no

# 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
;preferred master = no

# 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.
dns proxy = no

# define domain admins
domain admin group = users @admin

# logon script
logon script = timeset.bat

# for windows 2000 and XP clients
add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u

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

# Un-comment the following and create the netlogon directory for Domain Logons
[netlogon]
comment = Network Logon Service
path = /usr/local/samba/lib/netlogon
guest ok = yes
writable = no
share modes = no

[downloads]
comment = Downloads
path = /downloads
browseable = yes
writable = yes
guest ok = yes
valid users = root raj
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 client Access denied unable to connect Systest7 Linux - Networking 11 12-12-2010 08:45 PM
Cannot connect to Samba server from Win2k client buddhahat Linux - Networking 11 06-20-2005 03:01 PM
Windows 98 client won't connect to Samba shares ehedman Linux - Software 1 02-26-2004 07:41 PM
Samba:Unable to connect shares from win2k client vikram_cvk Linux - Software 0 01-13-2004 06:03 AM
Howto connect to shares on a win2k server ScreeminChikin Linux - Networking 9 10-10-2002 08:54 PM


All times are GMT -5. The time now is 04:09 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration