Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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?
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.
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)
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)
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
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.
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.