LinuxQuestions.org
Help answer threads with 0 replies.
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 11-12-2008, 06:06 AM   #16
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15

Quote:
Originally Posted by billymayday View Post
What is in the samba logs?
I did not see any error messages in the log files:

log.smb:
I restarted the demon, and the log just recorded the events.
Quote:
[2008/11/12 04:13:46, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/12 04:15:49, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/12 06:51:37, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/12 06:53:10, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
log.nmb:
I set netbios name was localhost.localdomain which was the actual host name. There were error messages. "Netbios name ... is too long.
I set the host name because commenting out the line, did not solve the problem.

Quote:
[2008/11/12 06:53:07, 0] nmbd/nmbd.c:main(849)
nmbd version 3.2.0rc1-15.fc9 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008
[2008/11/12 06:53:07, 0] nmbd/nmbd_nameregister.c:register_name(483)
register_name: NetBIOS name LOCALHOST.LOCALDOMAIN is too long. Truncating to LOCALHOST.LOCAL
[2008/11/12 06:53:07, 0] nmbd/nmbd_nameregister.c:register_name(483)
register_name: NetBIOS name LOCALHOST.LOCALDOMAIN is too long. Truncating to LOCALHOST.LOCAL
[2008/11/12 06:53:07, 0] nmbd/nmbd_nameregister.c:register_name(483)
register_name: NetBIOS name LOCALHOST.LOCALDOMAIN is too long. Truncating to LOCALHOST.LOCAL
[2008/11/12 06:53:48, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(395)
*****

Samba name server LOCALHOST.LOCALDOMAIN is now a local master browser for workgroup MYGROUP on subnet 192.168.77.200
 
Old 11-12-2008, 06:10 AM   #17
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jdbeyers View Post
Hi,

At a glance, everything looks fine. Is your Windows XP machine part of a NT/Win2K/Win2k3/etc domain?

Is your WinXP username "sam"?

Try setting up a NetBios server name for Samba.

To test your account details, run smbpasswd and ensure that your WinXP and SMB password is the same. Now test this by running in a DOS box:
net use z: \\xxx.xxx.xxx.xxx\share /user:sam password /persistent:no
Substitute the xxx's for the IP address of the server, to rule out name resolution issues. Then replace the word "password" for your "sam" account password.

If all fails, here is a sample smb.conf file for you to use.
I don't know why I can not use
net use z: \\xxx.xxx.xxx.xxx\share /user:sam
command on the server. I looked at the man page of net command and could not find "use" option.

Also, I tried your sample smb.conf, but it did not solve the problem.

I am suspecting Linux firewall might prevent smbd from communicating with the client. Is it possible?

Last edited by samohn; 11-12-2008 at 06:28 AM.
 
Old 11-12-2008, 06:23 AM   #18
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jdbeyers View Post
Hi,

At a glance, everything looks fine. Is your Windows XP machine part of a NT/Win2K/Win2k3/etc domain?

Is your WinXP username "sam"?

Try setting up a NetBios server name for Samba.

To test your account details, run smbpasswd and ensure that your WinXP and SMB password is the same. Now test this by running in a DOS box:
net use z: \\xxx.xxx.xxx.xxx\share /user:sam password /persistent:no
Substitute the xxx's for the IP address of the server, to rule out name resolution issues. Then replace the word "password" for your "sam" account password.

If all fails, here is a sample smb.conf file for you to use.
I don't know why I can not use
net use z: \\xxx.xxx.xxx.xxx\share /user:sam
command on the server. I looked at the man page of net command and could not find "use" option.

Last edited by samohn; 11-12-2008 at 06:29 AM.
 
Old 11-12-2008, 07:22 AM   #19
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Quote:
Yes, I did. I commented out netbios name.
Either a typo or misunderstanding. Commenting out a statement (IMO) means inserting i.e. in this case either a # or ; as the first character in the line. Uncommenting means deleting the # or ; character. Once you restart samba you can see if it is working from the linux box via the command:

smbclient -L <netbios> (whatever name you used in the netbios = statement).

At the password prompt just press the enter key. You should see a list of shares etc.
In addition on the XP computer in a CMD prompt box you can use the command

net view \\netbiosname (again replace with actual name)

You should see a list of browseable shares if everything is working. In addition XP might not like share level security. I would change to security = user, change encrypt password to yes and add a samba password via the command

smbpassed -a username (You must be root. Use your actual username on the linux box)
 
Old 11-12-2008, 07:45 AM   #20
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk View Post
Either a typo or misunderstanding. Commenting out a statement (IMO) means inserting i.e. in this case either a # or ; as the first character in the line. Uncommenting means deleting the # or ; character. Once you restart samba you can see if it is working from the linux box via the command:
Sorry. It was a typological mistake. I uncommented the statement, instead.


Quote:
smbclient -L <netbios> (whatever name you used in the netbios = statement).

At the password prompt just press the enter key. You should see a list of shares etc.
In addition on the XP computer in a CMD prompt box you can use the command

net view \\netbiosname (again replace with actual name)

You should see a list of browseable shares if everything is working. In addition XP might not like share level security. I would change to security = user, change encrypt password to yes and add a samba password via the command

smbpassed -a username (You must be root. Use your actual username on the linux box)
I run the smbclient command and the result was:
Quote:
[root@localhost samba]# smbclient -L localhost.localdomain
Enter sam's password:
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.2.0rc1-15.fc9]

Sharename Type Comment
--------- ---- -------
IPC$ IPC IPC Service (Samba Server Version 3.2.0rc1-15.fc9)
share Disk Share holder
public Disk Public Stuff
homes Disk Home Directories
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.2.0rc1-15.fc9]

Server Comment
--------- -------
LOCALHOST.LOCAL Samba Server Version 3.2.0rc1-15.fc9

Workgroup Master
--------- -------
net1 LT1
MYGROUP LOCALHOST.LOCALDOMAIN

Last edited by samohn; 11-12-2008 at 08:15 AM.
 
Old 11-12-2008, 08:06 AM   #21
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Change the line to:
netbios name = samba

Restart samba.
service smb restart (must be root)

The net comand is windows not linux.
http://www.computerhope.com/nethlp.htm

It would also help to have both computers on the same workgroup. Your XP workgroup name is globe. I assume that there are only 2 computers on the LAN.

Last edited by michaelk; 11-12-2008 at 08:09 AM.
 
Old 11-12-2008, 08:15 AM   #22
daveginorge
Member
 
Registered: Oct 2006
Location: Porsgrunn, Norway
Distribution: CentOS 5 / 6 / 7
Posts: 107

Rep: Reputation: 16
Quote:
I suspected SELinux's firewall and I turned it off and tried to connect to the samba server from the XP, but it did not work.
But have you disabled the firewall. Setting SElinux to permissive does not turn off the firewall, run the firewall wizard and check it's disabled if not disable it until you have the system working.
 
Old 11-12-2008, 08:26 AM   #23
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
I don't know why I can not use
net use z: \\xxx.xxx.xxx.xxx\share /user:sam
command on the server. I looked at the man page of net command and could not find "use" option.
I made a simple mistake. I run the command on the Linux machine instead of on the XP client.

I just run these commands on the XP client and got errors:

>net use z:\\localhost.localdomain/user:baz

System error 67 has occurred.
The network name was not found.

>net view \\localhost.localdomain

system error 1231 has occurred.
The network location can not be reached ....

Do you know why these errors occurred?
I pinged localhost.localdomain and it worked.
 
Old 11-12-2008, 08:38 AM   #24
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk View Post
Change the line to:
The net comand is windows not linux.
http://www.computerhope.com/nethlp.htm
I have noticed the mistake and posted a thread regarding this. Please take a look at it.
 
Old 11-12-2008, 09:20 AM   #25
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
The commands fail because localhost.localdomain is not a valid netbios name. You can use the IP address instead. It would be better if you changed the name via the netbios name statement in the smb.conf file as already suggested.
 
Old 11-12-2008, 10:02 AM   #26
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
Just give your box an actual name and it should work.

Edit - BTW, when you ping "localhost" you're pinging your loopback address, you'll notice that the IP address in the response to your ping was most likely 127.0.0.1. You're pinging yourself.

Last edited by JD50; 11-12-2008 at 10:05 AM.
 
Old 11-12-2008, 10:15 AM   #27
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk View Post
The commands fail because localhost.localdomain is not a valid netbios name. You can use the IP address instead. It would be better if you changed the name via the netbios name statement in the smb.conf file as already suggested.
Actually, I have changed the netbios name to samba, i.g.
Also, I used the actual IP address of the server with the commands, but both did not work.
 
Old 11-12-2008, 01:26 PM   #28
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by JD50 View Post
Just give your box an actual name and it should work.

Edit - BTW, when you ping "localhost" you're pinging your loopback address, you'll notice that the IP address in the response to your ping was most likely 127.0.0.1. You're pinging yourself.
Hi,

I pinged the server using its name from the XP but not with localhost.
 
Old 11-12-2008, 02:06 PM   #29
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,703

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
What were the error messages?
 
Old 11-12-2008, 10:35 PM   #30
samohn
Member
 
Registered: Aug 2008
Posts: 55

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by michaelk View Post
What were the error messages?
I did not keep the error messages, but they were like:

System error [1231] has occurred.

There were several different error numbers.

I researched the numbers and Microsoft Tech Support on-line says
that the error messages mean that windows could not find the resource.

So, I set IP adress and host name in HOSTS file as
samba 192.168.xxx.xxx

samba is the netbios name set in smb.conf file.

Then, I do not see the error messages. But, I still can not access the share form the XP.
 
  


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
Xp-host can't access internet through my Fedora box?? Techno T Linux - Networking 6 06-14-2007 12:25 PM
Samba - No Write Access from Linux Box HKDude Linux - Networking 6 05-30-2005 02:59 PM
Samba: Windows XP Pro access to Linux box bramadams Slackware 7 02-05-2005 09:25 AM
Access Mandrake box from Fedora Core 1 box btexpress Linux - Networking 0 05-30-2004 07:50 PM
Samba access WIN XP shares from linux box rmanocha Linux - Software 8 10-24-2003 08:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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