LinuxQuestions.org
Help answer threads with 0 replies.
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 01-13-2005, 03:24 PM   #1
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Rep: Reputation: 15
is samba awake?


Hi guys

I'm not sure how to phase this question, but how can I tell if the Linux machine is awake and able to answer network calls from an NT machine.

I've been trying to fix this for just about a week now, every single site/how to/tutorial I've been to has the same basic smb.conf file as mine.

I can see the Linux machine in windows but when I click on it the network path can not be found. Pinging the Linux machine from NT always times out but pinging the other way is fine

I'm starting to think that my smb.conf file is OK but that something else is amiss.
 
Old 01-13-2005, 03:28 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Is samba running:
netstat -nlp

Do you have a firewall in place:
iptables -nL
 
Old 01-13-2005, 05:24 PM   #3
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
Hi david_ross

Interesting that you should reply.

On two of many google searches on this topic I found a couple of your replies in other threads where you mentioned the "iptables -nL" commands, which I tried.

I have no idea what any of the results means but I don't see "error" anywhere, though I noticed that what appears to be IP addresses are all 0. If it helps, I can post what is there, though it would be much easier (I think) if you could tell me what to look for.

I tried "netstat" and can see the machine ip address in the result so assumes that it is working. (I've done both commands a couple of time now and am starting to mix the two result up)

I have no firewall in place anywhere

I know about port 137, 138, 139 and as far as I can tell they are good to go. (Both windows and Linux)

In another thread you also mentioned about permissions and as far as I can tell I own everything that I'm trying to share in Linux.

I have also seen a few times where I have to have matching accounts, (both in windows and Linux) I'm completely lost on that one. where are the accounts supposed to be?

I have done the "smb passwd" and can only have one password/account??? at a time and I have 6 machines that need access to Linux, sometimes at the same time.

This is the second time I've tried to network the two and the first time NT was able to see Linux right away but I couldn't do it the other way, exact opposite of what I'm experiencing now.

I've looked at the smb.conf from the earlier install and can see nothing different between the two, which brings me to the point that the problem must be somewhere else.
 
Old 01-13-2005, 07:28 PM   #4
tonyr321
LQ Newbie
 
Registered: Dec 2004
Location: jamaica aka yardie
Posts: 21

Rep: Reputation: 15
Can i see a copy of you smb.conf file
 
Old 01-14-2005, 06:41 AM   #5
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
Since you can't ping the Linux machine from the Windows machine, it looks very much like a firewall issue. By default, Fedora will set up a firewall and you may not even be aware of it.

From the command line on your Linux box, as the root user execute:

iptables -F

and then try to ping/access the Samba shares.

If it works, you'll need to either disable the firewall on your Linux box or configure it to allow pings/SMB traffic.
 
Old 01-14-2005, 04:12 PM   #6
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
Hi cowanrl

I tried "iptables -F" and nothing happened and I tried pinging from window and was the same. Now I'm very new to Linux so your going to have to tell me how to check if there's a firewall.


Code:
[global]
   workgroup = BBE
   netbios name = BBE_SERVER
   server string =
;   message command = /usr/bin/linpopup "%f" "%m" %s; rm %s
   printcap name = cups
   load printers = yes
   printing = cups
   printer admin = @adm
;   printer admin = @"Domain Admins"
   log file = /var/log/samba/log.%m
   max log size = 2000
   log level = 8
;   hosts allow = 192.168.1. 192.168.2. 127.
   guest account = nobody
   map to guest = bad user
   security = user
;   password server = <NT-Server-Name>
;   password server = *
;   password level = 8
;   username level = 8
;   min passwd length - 8
   encrypt passwords = yes
   smb passwd file = /etc/samba/smbpasswd
;   unix password sync = Yes
;   pam password change = yes
;   passwd program = /usr/bin/passwd %u
;   passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
;   *passwd:*all*authentication*tokens*updated*successfully*
;   username map = /etc/samba/smbusers
;   include = /etc/samba/smb.conf.%m
;   winbind uid = 10000-20000
;   winbind gid = 10000-20000
;   winbind separator = +
;   winbind use default domain = yes
;   template homedir = /home/%D/%U
;   obey pam restrictions = yes
;   template shell = /bin/bash
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
;   interfaces = 192.168.12.2/24 192.168.13.2/24
;   remote browse sync = 192.168.3.25 192.168.5.255
;   remote announce = 192.168.1.255 192.168.2.44
   local master = no
   os level = 10
   domain master = no
   preferred master = no
;   domain logons = yes
;   logon script = %m.bat
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U
;   logon home = \\%L\%U\.profile
;   add user script = /usr/sbin/useradd -d /dev/null -g machines -c 'Machine Account' -s /bin/false -M %u
;   add user script = /usr/share/samba/scripts/smbldap-useradd.pl -w -d /dev/null -g machines -c 'Machine Account' -s /bin/false %u
;   add user script = /usr/sbin/useradd -s /bin/false %u
;   domain admin group = root @adm
;   domain guest group = nobody @guest
;   ldap admin dn = cn=root,dc=mydomain,dc=com
;   ldap ssl = start_tls
;   ldap port = 389
;   ldap suffix = dc=mydomain,dc=com
;   ldap server = ldap.mydomain.com
;   name resolve order = wins lmhosts bcast
  wins support = yes
;   wins server = w.x.y.z
;   wins proxy = yes
   dns proxy = no
   preserve case = yes
   short preserve case = no
   default case = lower
   case sensitive = no
   Mangle case = yes
   client code page = 850
   character set = ISO8859-1
[homes]
   comment = Home Directories
   browseable = yes
   writable = no
;   vfs object = /usr/lib/samba/vfs/recycle.so
;   vfs options= /etc/samba/recycle.conf
;   veto files = /*.eml/*.nws/*.dll/*.mp3/*.MP3/*.mpg/*.MPG/*.vbs/*.VBS/
; [netlogon]
;   comment = Network Logon Service
;   path = /var/lib/samba/netlogon
;   guest ok = yes
;   writable = no
;   root preexec = /usr/bin/ntlogon -u %U -g %G -o %a -d /var/lib/samba/netlogon/
;   root postexec = rm -f /var/lib/samba/netlogon/%U.bat
;[Profiles]
;   path = /var/lib/samba/profiles
;   browseable = no
;   guest ok = yes
;   writable = yes
;   root preexec = PROFILE=/var/lib/samba/profiles/%u; if [ ! -e $PROFILE ]; \
;   then mkdir -pm700 $PROFILE; chown %u.%g $PROFILE;fi
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = yes
   writable = no
   printable = yes
   create mode = 0700
   print command = lpr-cups -P %p -o raw %s -r
;   print command = lpr-cups -P %p %s -r #
;   lpq command = lpq -P %p
;   lprm command = cancel %p-%j
[JAN_COLLECTION]
   comment = Stock piled software
   path = /home/jan/Collection
   browseable = yes
   public = yes
   guest ok = yes
   writable = yes
 
Old 01-14-2005, 05:36 PM   #7
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
If iptables -F didn't solve the problem then it's not a firewall issue.

The problem with not being able to ping the Linux machine from your Windows machine could be related to a setting in the proc file system. Execute this command as root on the Linux machine:

echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Then try to pinging from Windows to Linux again.

Unless you definitely want to use your Samba server as a WINS server, remove the line:

wins support = yes

from your smb.conf file and restart samba. Then try to access your Samba server again from Windows. If you can't access it from Windows explorer, try executing this from the command line on your Windows machine:

net view \\BBE_SERVER

That should show you a list of the shares on your Samba server.

If that doesn't work, execute:

net view \\ipaddress

Substitute the IP address of your Samba server in the command.

Post the results of these tests here.
 
Old 01-14-2005, 06:08 PM   #8
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
Hi cowanrl

Did everything you suggested

took out "wins support = yes" in smb.conf and restarted samba

Tried "echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all" as root which returned nothing in konsole.

No change in pingability from windows

when I did "net view" with machine name or ip address in windows I got 'system error 53 has occured. The network path not found.'

When I tried "net view" by itself it returned a list of all the machine on the network and the Linux box was listed there with all the others
 
Old 01-15-2005, 06:42 AM   #9
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
Let's review our symptoms.

Symptom 1. Pinging from the Linux machine to the NT machine works fine. Pinging from NT to Linux does not work.
There are 2 things that I'm aware of that usually cause this:

A firewall blocking the pings is the most common. When you executed iptables -F, that should have flushed the iptables firewall and allowed the ping requests to come in from the NT machine. It looks like an iptables firewall is not the problem.

The file /proc/sys/net/ipv4/icmp_echo_ignore_all containing a 1. This basically tells the kernel not to respond to pings. It's a security measure to make the machine less visible on the network. You changed the files contents to 0 and that didn't solve the problem so that eliminates that. This file usually contains a 0 by defualt. The only time I've seen it changed to 1 without the user being aware of it is by some sort of firewall software.

Symptom 2. The Samba server can be seen on the network but every time you try to access it, you get an error something similar to system error 53 has occured. The network path not found. There are 2 things that I'm aware of that usually cause this:

A firewall on the Linux machine. The Samba server announces its presence on the network by using broadcasts. These are not blocked by the firewall therefore the Samba server's presence is detected on the network. However, when you try to access the Samba server, the firewall blocks that traffic. We've already proven that it's not an iptables firewall issue.

The nmbd portion of Samba is not working properly. This is the portion of Samba that takes care of identifying itself on the network and other name resolution issues. We'll need to make some tests for that.

First we need to make some ping tests. Lets make sure the Linux machine can ping itself. Execute this from the Linux command line and post the results here:

ping -c 5 "ipaddress of your Linux machine"

Just put in the ip address of the Linux machine.

Next, I want to see the results of the ping to the NT machine. Execute this from the Linux command line and post the results here:

ping -c 5 "ip address of the NT machine"

Second, lets run some tests from the Linux machine to see if the Samba server is up and running. These next few tests should display the shares you have set up on your Samba server. Execute these from the command line of the Linux machine and post the results here:

smbclient -L localhost -N

and

smbclient -L bbe_server -N

If those 2 commands generate a list of shares on your server, try this one:

smbclient -L localhost -Uusername

Put in one of the Samba user accounts you created on your server. It should prompt you for the password and then display the list of shares.

Finally, I'd like to see processes running on your Linux machine. Execute this command:

ps -e > ps.txt

This saves the results of the ps -e command in a file named ps.txt. Paste the contents of ps.txt in your response.

This should give you something to work with.
 
Old 01-15-2005, 01:14 PM   #10
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
Hi cowanrl

first off I'd like to thank you for your time and knowledge.

What I did was cut and paste your commands into konsole and I'm a little hesitant to just paste all the result in one post, by reading the result I understood what the commands were "asking" so I'll just post summaries and if you need more I'll post everything as needed.

Both

ping -c 5 "ipaddress of your Linux machine" and
ping -c 5 "ip address of the NT machine" returned this

5 packets transmitted, 5 received, 0% packet loss, time 3997ms

smbclient -L localhost -N
smbclient -L bbe_server -N
smbclient -L localhost -Uusername. (I used both root and my account on the last one)

All returned basically the same results which I recognize from smb.conf file. Now as I said I'm new to Linux and want to understand, both bcast and nmask look odd to me

added interface ip=169.254.2.1 bcast=169.254.255.255 nmask=255.255.0.0
Anonymous login successful
Domain=[BBE] OS=[Unix] Server=[Samba 2.2.8a]

Sharename Type Comment
--------- ---- -------
homes Disk Home Directories
print$ Disk
pdf-generator Disk
pdf-screen Disk
pdf-printer Disk
pdf-prepress Disk
JAN_COLLECTIO Disk Stock piled software
VIDEO Disk Video
MUSIC Disk Music
BBE_BACKUP Disk BBE Backup
BBE_GLOBAL Disk For general use
IPC$ IPC IPC Service ()
ADMIN$ Disk IPC Service ()

Server Comment
--------- -------
BBE_SERVER

Workgroup Master
--------- -------
BBE

ps -e > ps.txt returned....

PID TTY TIME CMD
1 ? 00:00:04 init
2 ? 00:00:00 keventd
3 ? 00:00:00 ksoftirqd_CPU0
4 ? 00:00:00 ksoftirqd_CPU1
5 ? 00:00:00 kswapd
6 ? 00:00:00 bdflush
7 ? 00:00:00 kupdated
8 ? 00:00:00 kinoded
9 ? 00:00:00 mdrecoveryd
13 ? 00:00:00 scsi_eh_0
17 ? 00:00:00 kjournald
110 ? 00:00:00 devfsd
195 ? 00:00:00 khubd
312 ? 00:00:00 kjournald
315 ? 00:00:00 kjournald
780 ? 00:00:00 portmap
794 ? 00:00:00 syslogd
802 ? 00:00:00 klogd
845 ? 00:00:00 rpc.statd
905 ? 00:00:00 xfs
1331 ? 00:00:00 kdm
1338 ? 00:00:29 X
1339 ? 00:00:00 saslauthd
1340 ? 00:00:00 saslauthd
1341 ? 00:00:00 saslauthd
1342 ? 00:00:00 saslauthd
1343 ? 00:00:00 saslauthd
1347 ? 00:00:00 kdm
1364 ? 00:00:00 sshd
1385 ? 00:00:00 tmdns
1412 ? 00:00:00 xinetd
1443 ? 00:00:00 cupsd
1557 ? 00:00:00 nfsd
1558 ? 00:00:00 nfsd
1559 ? 00:00:00 nfsd
1560 ? 00:00:00 nfsd
1561 ? 00:00:00 nfsd
1562 ? 00:00:00 nfsd
1563 ? 00:00:00 nfsd
1564 ? 00:00:00 nfsd
1565 ? 00:00:00 lockd
1566 ? 00:00:00 rpciod
1578 ? 00:00:00 rpc.mountd
1660 ? 00:00:00 automount
1662 ? 00:00:00 automount
1756 ? 00:00:00 crond
1783 ? 00:00:00 smbd <--------------- Both seem
1793 ? 00:00:00 nmbd <--------------- to be running
1867 vc/1 00:00:00 mingetty
1868 vc/2 00:00:00 mingetty
1869 vc/3 00:00:00 mingetty
1870 vc/4 00:00:00 mingetty
1871 vc/5 00:00:00 mingetty
1872 vc/6 00:00:00 mingetty
2086 ? 00:00:00 startkde
2174 ? 00:00:00 kdeinit
2177 ? 00:00:00 kdeinit
2181 ? 00:00:00 kdeinit
2183 ? 00:00:00 kdeinit
2184 ? 00:00:00 fam
2193 ? 00:00:00 kdeinit
2194 ? 00:00:00 kwrapper
2196 ? 00:00:00 kdeinit
2197 ? 00:00:01 kdeinit
2199 ? 00:00:01 kdeinit
2200 ? 00:00:00 kdeinit
2205 ? 00:00:06 kdeinit
2206 ? 00:00:00 kwikdisk
2224 ? 00:00:04 kdeinit
2226 pts/0 00:00:00 bash
2261 pts/1 00:00:00 su
2264 pts/1 00:00:00 bash
2298 pts/1 00:00:05 kwrite
2300 ? 00:00:00 kdeinit
2303 ? 00:00:00 kdeinit
2306 ? 00:00:00 kdeinit
2308 ? 00:00:00 kdeinit
2312 ? 00:00:00 kdeinit
2324 ? 00:00:00 smbmount
2343 pts/2 00:00:00 su
2347 pts/2 00:00:00 bash
2429 ? 00:00:00 LinNeighborhood
2443 ? 00:00:04 kdeinit
2552 pts/2 00:00:00 ps

usually when I get a new OS I install it a couple of time to get a feel for it and on this last install I was a little picky about some of the packages that I wanted;

Webmin is installed but not running
SWAT is not installed
I'm using linNeighborhood
I lost the KDE menu and it took a bit of work to get it back but I knew what I was looking for, so I don't think I messed anything up.
This time I did nothing with the gateway setup cause I don't need internet on this machine
When I installed I set the security to high
My root password is only 7 charactors but install didn't tell me to use 8 like it usually did

Now I know some of these things may sound ridiculus and have nothing to do with what's going on, but I have seen weirder things in windows. . . and my kids

Again, thank you for your time and knowledge
 
Old 01-15-2005, 01:23 PM   #11
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
I was reviewing my post and noticed that the share " JAN_COLLECTIO" is missing the last letter , It's supposed to be "JAN_COLLECTION"

I don't know if this means anything.
 
Old 01-15-2005, 03:43 PM   #12
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
SUCCESS!!!!

I went through services again, this time one by one and found Shorewall, a firewall

I stopped it and everything works as it should, the way I want it

Thank you cowanrl for your time and trouble shooting ideas.
 
Old 01-16-2005, 09:12 AM   #13
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
I knew it had all the smyptoms of a firewall. I guess it was just a matter of figuring out which one.

I'm not all that familiar with Shorewall. Which service was it? Knowing that could help me in the future to help others with a similar problem.
 
Old 01-16-2005, 09:18 AM   #14
cowanrl
Member
 
Registered: Dec 2004
Location: Western Pennsylvania, USA
Distribution: Red Hat
Posts: 150

Rep: Reputation: 15
I beleive the maximum length for the name of a share is 15 characters. JAN_COLLECTION comes in at 14.

As long as you can access it as \\BBE_SERVER\JAN_COLLECTION from your Windows machines, I wouldn't worry about it. It may just be that the output of the smbclient command is truncating a character.

If you can only access it as \\BBE_SERVER\JAN_COLLECTIO from Windows, I would shorten the name of the share to avoid problems in the future.
 
Old 01-16-2005, 07:58 PM   #15
Jan Tanjo
Member
 
Registered: Dec 2004
Location: Toronto ON
Distribution: Mandrake 9.2 . Fedora 5
Posts: 65

Original Poster
Rep: Reputation: 15
Still quite new to Linux So I'm not quite sure how to answer.

It was (Past tense, I already uninstalled it) called Shorewall in the "service list." I saw it during boot up and shut down and it was called Shorewall there also.
 
  


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
keeping xterm awake LancerNZ Linux - Newbie 1 05-06-2005 07:41 PM
awake jobs at specified time merlin23 Linux - Newbie 5 12-02-2004 12:34 PM
longest time awake without sleeping? nixel General 25 05-09-2004 01:42 PM
Staying awake houseathon General 20 10-01-2003 01:13 AM
How do you stay awake? bkeating General 20 01-25-2003 04:40 PM

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

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