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 09-20-2002, 09:13 PM   #1
ShaneNINE
LQ Newbie
 
Registered: Aug 2002
Location: Germantown, MD, USA
Distribution: RedHat 7.3
Posts: 27

Rep: Reputation: 15
@#$%ing SAMBA & XP


AAARRRGGGHHHH!!!!!!

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 TESTPARM:
Code:
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[data]"
Processing section "[system]"
Processing section "[tmp]"
Processing section "[printers]"
Loaded services file OK.
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.
 
Old 09-21-2002, 01:15 AM   #2
WayneDV
LQ Newbie
 
Registered: Sep 2002
Distribution: Mandrake & Redhat
Posts: 2

Rep: Reputation: 0
Hi Shane

When XP throws up the login prompt, replace "SMAUG" with the linux box's Netbios name "SLEETH" and then try it.

username: SLEETH/shane
password: ___________ < waiting for pwd
 
Old 09-21-2002, 09:53 AM   #3
ShaneNINE
LQ Newbie
 
Registered: Aug 2002
Location: Germantown, MD, USA
Distribution: RedHat 7.3
Posts: 27

Original Poster
Rep: Reputation: 15
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.

Anxiously Awaiting...
 
Old 09-21-2002, 10:06 AM   #4
ShaneNINE
LQ Newbie
 
Registered: Aug 2002
Location: Germantown, MD, USA
Distribution: RedHat 7.3
Posts: 27

Original Poster
Rep: Reputation: 15
Some weird freaky stuff...

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?).
 
Old 09-21-2002, 10:25 AM   #5
ShaneNINE
LQ Newbie
 
Registered: Aug 2002
Location: Germantown, MD, USA
Distribution: RedHat 7.3
Posts: 27

Original Poster
Rep: Reputation: 15
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)?
 
Old 09-21-2002, 10:41 AM   #6
TuxWannabe
LQ Newbie
 
Registered: Sep 2002
Location: Geneva
Distribution: SuSE 8.0
Posts: 8

Rep: Reputation: 0
I guess the last password change is unnecessary
[root@redhat root]# smbpasswd shane

but u need to specifiy two DIFFERENT passwords , one for the Linux and one for the Samba account.

Samba uses the user accounts of your Linux box but uses it's own passwords that are encrypted for Windows (at least i think so).

So on Linux you get "shane"/"passwd"
and on Samba "shane"/"smbpasswd"

so You need to specifiy at least two passwords.
 
Old 05-14-2003, 01:40 PM   #7
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
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:

cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

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.
 
Old 05-31-2003, 01:22 AM   #8
aldanor
LQ Newbie
 
Registered: Dec 2002
Location: Nashville, TN
Distribution: Red Hat 8.0
Posts: 8

Rep: Reputation: 0
Hi,

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)

added interface ip=192.168.1.100 bcast=192.168.1.255 nmask=255.255.255.0

I'm a total linux newbie, so I'm sure I'm just doing something stupid. I just hope someone can tell me what that stupid thing is.

Please Help!

Thanks
 
Old 05-31-2003, 01:50 AM   #9
Zotz
LQ Newbie
 
Registered: May 2003
Distribution: RH9 babeEE
Posts: 8

Rep: Reputation: 0
Stupid question, you turn off XP's firewall? Or add the ports for it to the XP firewall?

Last edited by Zotz; 05-31-2003 at 03:29 AM.
 
Old 05-31-2003, 01:52 AM   #10
aldanor
LQ Newbie
 
Registered: Dec 2002
Location: Nashville, TN
Distribution: Red Hat 8.0
Posts: 8

Rep: Reputation: 0
Firewall is (and was) turned off.
 
Old 05-31-2003, 03:22 AM   #11
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
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.
 
Old 05-31-2003, 07:54 AM   #12
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
These tutorials are quite good.

http://www-1.ibm.com/servers/esdd/tu...mba/index.html


http://networking.earthweb.com/netos...le.php/1144701

http://networking.earthweb.com/netos...le.php/1151091

Start with the one by IBM.
 
Old 05-31-2003, 11:45 AM   #13
aldanor
LQ Newbie
 
Registered: Dec 2002
Location: Nashville, TN
Distribution: Red Hat 8.0
Posts: 8

Rep: Reputation: 0
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.
 
Old 05-31-2003, 11:53 AM   #14
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Windows 10 prior Red Hat User
Posts: 473

Rep: Reputation: 30
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.
 
Old 05-31-2003, 12:17 PM   #15
aldanor
LQ Newbie
 
Registered: Dec 2002
Location: Nashville, TN
Distribution: Red Hat 8.0
Posts: 8

Rep: Reputation: 0
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.
 
  


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
!@#$%^&ing windopes XasPeration! Charred General 25 07-12-2005 01:29 PM
SAMBA & CUPS (Linux & Windows Printing) xcythe Linux - Networking 4 06-12-2005 11:46 AM
SuSE9 && Samba && Win2k DaFrEQ Linux - Software 2 01-27-2004 07:45 AM
Samba: Authenticate Linux-Clients in Samba Domain & Mount mule Linux - Software 0 12-10-2003 01:21 AM
(*&@ING Winblows! patientzero Linux - Software 33 09-14-2003 06:55 PM

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

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