Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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've been trying for two weeks now to get my XP box to connect to my Linux box via SAMBA. I've managed to get it to work with share level security, but not with user level security. I've been through a handful of smb.conf files. My current one is:
Code:
[global]
workgroup = mountain
netbios name = SLEETH
server string = %h server (Samba %v)
encrypt passwords = Yes
smb passwd file = /etc/samba/sambapasswd #Easier backups
syslog = 0 #Level of logging to syslog. Keep this low
max log size = 1000
log file = /var/log/samba/samba.log.%m # where to keep records
log level = 2 #Log interesting stuff only
# Performance tuning - this works. RTFM before tweaking
socket options = IPTOS_LOWDELAY \
TCP_NODELAY SO_SNDBUF=4096 SO_RCVBUF=4096
dns proxy = No
#One tool for one job. Use bind for DNS.
#Security
#These entries are essential.
invalid users = root
#Otherwise someone could attack the shares just by browsing
# from your workstation
# Specify the IP range of your LAN and the ethernet card used to
# access the LAN
# Leave the 127.0.0.1 entry there for diagnostics
interfaces = eth0 192.168.0.0/255.255.255.0 127.0.0.1/24
# Even if a remote attacker decodes a password, he is still
# locked out
bind interfaces only = yes
[homes]
# Allows users to store their data on the server
comment = Home Directories
read only = No
create mask = 0700
directory mask = 0700
browseable = Yes
[data]
# Create a folder for publicly shared resources like
# databases, telephone lists, etc.
comment = Data Files and Backups
# You need to set his path. Mine is...
path = /home/data
read only = No
create mask = 0775
directory mask = 0775
browseable = Yes
[system]
# Copy the i386 folder from the Win2k CD here.
# Saves lots of time installing new drivers!
# Any other other CDs you use a lot.
#
comment = System and Installation Files
# You need to set his path. Mine is...
path = /home/system
read only = No
create mask = 0775
directory mask = 0775
browseable = Yes
[tmp]
path = /tmp
read only = no
create mask = 0775
directory mask = 0775
browseable = Yes
[printers]
comment = All Printers
path = /tmp
create mask = 0700
printable = Yes
browseable = No
# End of file
I have a user setup with smbpasswd -a shane. No problems there.
My Linux box shows up in the XP network neighborhood, but when I try to go into it I have the BIG PROBLEM.
XP presents me with a login window. It wants a username and password. So I put in:
username: shane
password: *******
Then XP spits the login window back to me like so:
username: SMAUG/shane
password: ___________ < waiting for pwd
SMAUG is the name of the XP box.
That's all it does.
This is starting to get me a little upset. I keep hearing how samba is the simplest server to configure and get running. So far I don't believe it. Just so y'all know, I've been RTFM (many of them!) and doing what they say, but my setup doesn't work.
Output of SMBCLIENT -L REDHAT: (redhat is the hostname)
Code:
added interface ip=192.168.0.2 bcast=192.168.0.255 nmask=255.255.255.0
added interface ip=127.0.0.1 bcast=127.0.0.255 nmask=255.255.255.0
Password:
Anonymous login successful
Domain=[MOUNTAIN] OS=[Unix] Server=[Samba 2.2.5]
Sharename Type Comment
--------- ---- -------
homes Disk Home Directories
data Disk Data Files and Backups
system Disk System and Installation Files
tmp Disk
IPC$ IPC IPC Service (redhat server (Samba 2.2.5))
ADMIN$ Disk IPC Service (redhat server (Samba 2.2.5))
Server Comment
--------- -------
SLEETH redhat server (Samba 2.2.5)
Workgroup Master
--------- -------
MOUNTAIN
It seems to be ok on the Linux end, but I can't connect with XP.
Other bits:
- I don't have a firewall running.
- SWAT won't work on my box either.
Please help me save my sanity and help me get this !@#$ing thing working. Thanks very much.
Wayne, I've tried that. I've also tried to put in the host name, the IP address, the domain name, etc.
Everyone:
I also setup a WMWare Win98 VM on my XP box last night so I could test this with Win98. It doesn't work for Win98 either, though the behavior isn't quite the same. I get a username/pwd window for \\SLEETH\$IPC, but there is no text box for a username, only for a password. None of my Linux passwords work. I get the same thing if i try to connect directly to a share (\\SLEETH\TMP, for example). It wants a password, but won't take any of the passwords I've setup. It won't take a blank one, either.
I got it to work, but I'm not sure why it's working now. I started with a new user and just started typing:
Code:
[root@redhat root]# adduser bob
adduser bob
[root@redhat root]# passwd bob
Changing password for user bob.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@redhat root]# smbpasswd -ae bob
unable to open passdb database.
ERROR: Unable to locate bob in passdb!
[root@redhat root]# passwd bob
Changing password for user bob.
New password:
BAD PASSWORD: it's WAY too short
Retype new password:
Sorry, passwords do not match
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@redhat root]# passwd bob
Changing password for user bob.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@redhat root]# smbpasswd -a bob
New SMB password:
Retype new SMB password:
unable to open passdb database.
Added user bob.
[root@redhat root]# smbpasswd -ae bob
Enabled user bob.
[root@redhat root]# smbpasswd bob
New SMB password:
Retype new SMB password:
Password changed for user bob.
Password changed for user bob.
[root@redhat root]#
After that little bit of madness I could login with the user BOB. I'm going to try to recreate this with another user (shane) and see if I can do it. Perhaps then I can figure out why it wasn't working and what happened to make it work (unless, of course, some enlightened soul wants to point it out to me?).
Here's what I had to do to get user 'shane' to work:
Code:
[root@redhat root]# adduser shane
adduser: user shane exists
[root@redhat root]# passwd shane
Changing password for user shane.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@redhat root]# smbpasswd -a shane
New SMB password:
Retype new SMB password:
Added user shane.
[root@redhat root]# smbapsswd -e shane
bash: smbapsswd: command not found
[root@redhat root]# smbpasswd -e shane
Enabled user shane.
[root@redhat root]# smbpasswd shane
New SMB password:
Retype new SMB password:
Password changed for user shane.
Password changed for user shane.
Can someone please condense that down to the correct sequence of commands (I can't see having to specify the password that many times as normal)?
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Rep:
Hello,
I have an idea of what your problem is. You need to tell Linux to refer to your smbpasswd file for your windows users to connect. You can do it like this:
This will enable your windows users to connect. Also, check whether you have encrypted passwords set and that on your Windows box that you don't have "send unencrypted passwords to a third party smb server" set to yes on your windows security settings.
Oh, one more thing, I noticed that you have text entered as "sambapasswd" in several cases. You need to change that to "smbpasswd"
Something else that I found interesting in your script is why does it say OS being Unix? If you're connecting to your Windows XP box from Linux, it should say Windows XP Lan Manager or something similar.
Look below:
Domain=[MOUNTAIN] OS=[Unix] Server=[Samba 2.2.5]
Last edited by scottpioso; 05-14-2003 at 01:48 PM.
I'm a total Linux newbie trying to set up a file server on RH 8 using SAMBA. I'm having problems, and I thought I would find the answer in this thread but I tried everything mentioned, and nothing helped.
My linux machine is named PIPPIN, and I can see Pippin in My Network Places, but when I try to click on Pippin or any of the shares inside Pippin I get the logon dialog box asking for username and password, which I enter then it asks me for the info again, but this time it changes the text in the username field to FRODO/Nathan, where FRODO is the name of my XP machine, and Nathan is my username (Windows, Linux, and Samba). So this sounds very similar to the problem mentioned earlier, but like I said I tried everything mentioned before: changing FRODO with PIPPIN in the login box, doing the ten zillion password assignments, specifying a different Linux password and Samba password, telling Linux to refer to my smbpasswd file, and making sure that "send unencrypted passwords to a third party smb server" was disabled.
Oh, and when I try this on windows 98, like the one mentioned before I get a username/password window for \\FRODO\IPC$ with no textbox for username.
Unlike the problem mentioned before, I can access SWAT from my XP machine and I cannot even get it to work with share level security. It still asks me for a password for \\PIPPIN\Guest, but won't accept the password for the Guest account I setup in Linux and Samba.
Here's my smb.conf file:
# Global parameters
[global]
netbios name = Pippin
workgroup = Hobbiton
server string = Red Hat Linux 8.0 File Server
security = user
encrypt passwords = Yes
wins support = yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask = 0775
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[public]
path = /home/Nathan/temp
read only = No
guest ok = yes
writeable = yes
hosts allow = 192.168.1
And here's what I get as a result of smbclient -l 192.168.1.100 (ip for my linux box)
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Rep:
Hi,
Check my earlier reply about using the CAT command. I think you haven't entered your smbusers into your smbpasswd file. If you go into your smbpasswd file, page down to the bottom of the file and look and see if your users are listed there with an encrypted password. If not, enter the cat command I mentioned in my earlier reply.
Oh, and change your settings in XP back to sending unencrypted passwords back to no. That is, of course, if you have encrypt passwords set in your smbpasswd file.
Hope this helps.
Last edited by scottpioso; 05-31-2003 at 03:24 AM.
My users are listed at the bottom of the smbpasswd file, and I've tried that cat command about 5 times now.
Something looks a little wierd though. Both root and Guest have funky hex passwords, but Nathan (my main user) is just all X's. Does that mean that Nathan's password is not encrypted?
I've tried five billion tutorials, so three more can't hurt. I'll give them a shot as well.
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473
Rep:
No,
What that means is is that I believe they don't even have passwords. Do you have the Unix smbpasswd sync set to yes? You should see a line somewhere about the unix and smbpasswd sync. You need to set that to yes.
I also found something else. . .
After you issue the cat command you have to do this:
smbpasswd (username)[enter]
As it is right now, the users are not entered into the smbpasswd file. Even though they are users on the Linux box, you have to enter that command there too.
Hope this helps.
Last edited by scottpioso; 05-31-2003 at 11:58 AM.
ok, now i've got my funky hex password for Nathan in the smbpasswd file
Here's what's happening: I can access Pippin at the top level fine now. I can also access the Nathan folder (/home/Nathan), and if I go through that folder I can access /home/Nathan/temp just fine. The public share is also /home/Nathan/temp, but I get the login problem I was having before when I try to access it by double clicking on \\Pippin\public.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.