LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-02-2004, 09:27 PM   #1
caesarkim
Member
 
Registered: Nov 2003
Posts: 32

Rep: Reputation: 15
error samba configuration


I have two computers, samson(win 2k server) and frodo(linux).

i can connect to win2k server from linux through the command line like this.

>smbclient //samson/download -U Administrator password

then i can just see the files from public directories existing in win 2k server from linux.

and even though i ping win 2k server with the local ip and computer name on linux, i get a reply from it. but when i try to ping frodo on windows 2k server, i don't get the reply. but i get the reply by pinging the local ip of the linux machine.

what i want to do is browse frodo in windows 2k server so that i can shares files and also use the server, too.

on "Computers Near Me" on win 2k server, it shows "frodo", but when i try to browse, i get "Frodo is not accessible. The network path was not found.". i don't know why i can't get access to the linux machine from windows even though i can get access to windows from linux.

here is my smb.conf
[global]
log file = /var/log/samba/%m.log
load printers = yes
smb passwd file = /etc/samba/smbpasswd
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
obey pam restrictions = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
username map = /etc/samba/smbusers
hosts allow = 192.168.1.101 192.168.1.100
encrypt passwords = yes
wins proxy = yes
passwd program = /usr/bin/passwd %u
dns proxy = no
netbios name = frodo
browseable = yes
netbios aliases = frodo
server string = samba server
printing = cups
default = public
path = /tmp/download
unix password sync = Yes
workgroup = workgroup
os level = 20
auto services = public
printcap name = /etc/printcap
security = user
max log size = 0
pam password change = yes

[homes]
comment = Home Directories
browseable = yes
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775


[printers]
comment = All Printers
path = /var/spool/samba
browseable = no


[public]
path = /home
public = yes
only guest = yes
writable = yes
printable = no
browseable = yes
 
Old 08-02-2004, 10:00 PM   #2
cephlon
LQ Newbie
 
Registered: Oct 2003
Location: Chicago
Distribution: Suse
Posts: 17

Rep: Reputation: 0
Weird

I am having the same exact problem. Know what is weird, my linux box is called frodo too.
What distribution are you running? I am running Suse 9.1.

My windows box could see my linux box until I changed my Netbios name to "frodo" and now it can't find it at all.

Last edited by cephlon; 08-02-2004 at 10:06 PM.
 
Old 08-02-2004, 10:10 PM   #3
caesarkim
Member
 
Registered: Nov 2003
Posts: 32

Original Poster
Rep: Reputation: 15
i am using red hat 9.

can't figure it out.. i have been stuck in this problem for 2 weeks...
 
Old 08-02-2004, 10:54 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Maybe its the firewall, make sure its not blocking ports Samba is using.
TCP 139, 445
UDP 137, 138
by default
 
Old 08-02-2004, 11:11 PM   #5
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Rep: Reputation: 15
how can I know my firewall block these TCP and UDP port. I've chosen disable Firewall in Security Level Configuration but still have this trouble.
 
Old 08-02-2004, 11:21 PM   #6
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Make sure samson is part of the workgroup conveniently called "workgroup". Next make sure you added the user via smbadduser? Make sure samson is in "hosts allow =" and double check you firewall as Demonbane mentioned. You may want to add samson to /etc/hosts just for ease. As for your firewall:

[somedir]# redhat-config-securitylevel

Click on "Customize".
Click the check box for your network adapter (usually "eth0").

Click on the checkboxes for any services you want to allow (I allow WWW,
FTP and SSH).

In the "Other ports" edit box, enter
"137:udp,137:tcp,138:udp,138:tcp,139:udp,139:tcp,445:tcp". At a command prompt type

[somedir]# service iptables stop
Flushing all chains: [ OK ]
Removing user defined chains: [ OK ]
Resetting built-in chains to the default ACCEPT policy: [ OK ]
[somedir]# service iptables start
Flushing all current rules and user defined chains: [ OK ]
Clearing all current rules and user defined chains: [ OK ]
Applying iptables firewall rules: [ OK ]

This should allow all the packets necessary for Samba.

{snip from "http://lists.samba.org/archive/samba-docs/2003-March/000288.html"}
 
Old 08-02-2004, 11:24 PM   #7
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
More good info:

- - Your hint should only apply to a firewall that serves to harden your server
~ installation, i.e. if you use iptables on your server to control, which
~ kind of packets *from your local net* your server responds to.
~ If your firewall has the additional purpose to separate your local net
~ from the internet, then allowing NetBIOS over TCP/IP is not a good idea.
~ There are currently several windows worms that scan random IP address
~ ranges for weakly protected windows shares, so opening up your network to
~ these protocols is a bad idea!
~ To repeat that: You should open Ports 137, 138 and 139 (UDP and TCP)
~ only for your local net, not for the internet.

{snip from: "http://lists.samba.org/archive/samba-docs/2003-March/000289.html"}
 
Old 08-02-2004, 11:48 PM   #8
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Rep: Reputation: 15
yeah! thanks micxz. My share displayed.
 
Old 08-03-2004, 12:07 AM   #9
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Quote:
Originally posted by saudoi
yeah! thanks micxz. My share displayed.
Great glad to help. Was it the workgroup or smbadduser?
 
Old 08-03-2004, 01:38 AM   #10
saudoi
Member
 
Registered: Aug 2004
Location: VietNam
Distribution: Sun Solaris 10
Posts: 117

Rep: Reputation: 15
I've followed your posted,. At Samba Setting window, I leave default workgroup name is "mygroup" and add 1 samba user named ADM. Windows users can access my share now

ah, when I create Samba User, I see 2 options: Unix Username (I chose ADM - the 1st user in list) and Windows username (I typed "admin") and leave blank password.

When I move to Windows and try access my shared folder, the username and password appear, if I type "admin" (windows username), access denied. if I type ADM and enter, it work. Can you tell me why it is.

Thanks
 
Old 08-03-2004, 01:59 AM   #11
micxz
Senior Member
 
Registered: Sep 2002
Location: CA
Distribution: openSuSE, Cent OS, Slackware
Posts: 1,131

Rep: Reputation: 75
Quote:
Originally posted by saudoi
I've followed your posted,. At Samba Setting window, I leave default workgroup name is "mygroup" and add 1 samba user named ADM. Windows users can access my share now

ah, when I create Samba User, I see 2 options: Unix Username (I chose ADM - the 1st user in list) and Windows username (I typed "admin") and leave blank password.

When I move to Windows and try access my shared folder, the username and password appear, if I type "admin" (windows username), access denied. if I type ADM and enter, it work. Can you tell me why it is.

Thanks
I think this accurs because there is not linux user "admin". But there is a user ADM. Or maybe I misunderstood the question. (It's getting late)

This is the correct format for smbadduser:
smbadduser unixid:ntid
 
Old 08-03-2004, 04:05 AM   #12
peaceofcrap2001
LQ Newbie
 
Registered: Jun 2004
Posts: 11

Rep: Reputation: 0
hey

4:00 in the morning and I don't know why I am awake. From your smb.conf file, it seems like you are still using samba version 2.8 , 2.9 , or something like that. I would make sure two major things.

#1 Make sure your workgroup on your W2k and smb.conf file match.
#2 Make sure you have added the IP number of the linux box in as wins server in your W2k Machine

I would do a computer search and see if you can find it. If not, you may have more problem than I can see. Since I don't see the whole configuration file, I can't really help you with from what you have. If it helps, here is my configuration file

Code:
# Global parameters
[global]
        workgroup = MYGROUP
        netbios name = STAFF
        server string = Samba Server
        encrypt passwords = Yes
        obey pam restrictions = Yes
        pam password change = Yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
        username map = /etc/samba/smbusers
        unix password sync = Yes
        log file = /var/log/samba/%m.log
        max log size = 0
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        os level = 33
        preferred master = Yes
        domain master = Yes
        dns proxy = No
        wins support = Yes
        remote browse sync = 192.168.3.25 192.168.5.255 
        hosts allow = 192.168.1. 192.168.2.  127.
        printing = cups

[homes]
        comment = Home Directories
        valid users = %S
        read only = No
        create mask = 0664
        directory mask = 0775
        browseable = No
don't forget samba -a 'username'

Sorry, I am kinda sleepy and have to get up in 3 hours for work

Ambex
 
  


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 configuration nawin_g Linux - Networking 9 11-08-2005 03:23 PM
Samba Configuration halod Linux - Networking 1 09-02-2005 07:46 AM
Samba configuration help Krenn Slackware 3 07-30-2004 07:22 PM
Samba Configuration EzehM Linux - Networking 6 06-24-2004 02:46 PM
SAMBA configuration error wernerk Linux - Software 1 08-07-2003 07:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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