Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Am trying to access my newly setup CentOS box from XP using Samba. I think that Samba is correctly configured. I am using 'encrypted passwords' and security = user and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2010
    Location
    AUS, East Coast
    Posts
    10

    Samba/CentOS/XP Problem


    Am trying to access my newly setup CentOS box from XP using Samba. I think that Samba is correctly configured. I am using 'encrypted passwords' and security = user and have added a Samba user to map the XP user name to the Linux user name.

    Setting the smbd debug level to 10 only gives me the following output when trying a net use on XP:

    Code:
    [2010/07/19 19:46:18, 0] lib/util_sock.c:get_peer_addr(1224)
      getpeername failed. Error was Transport endpoint is not connected
    [2010/07/19 19:46:18, 0] lib/util_sock.c:get_peer_addr(1224)
      getpeername failed. Error was Transport endpoint is not connected
    [2010/07/19 19:46:18, 0] lib/util_sock.c:read_data(534)
      read_data: read failure for 4 bytes to client 0.0.0.0. Error = Connection reset by peer
    [2010/07/19 19:46:18, 1] auth/auth_util.c:create_token_from_username(1168)
      sid_to_uid for sschwarz (S-1-5-21-3602176571-387810723-1220632785-2000) failed
    [2010/07/19 19:46:22, 1] auth/auth_util.c:create_token_from_username(1168)
      sid_to_uid for sschwarz (S-1-5-21-3602176571-387810723-1220632785-2000) failed
    After that log output is generated, XP asks me for the userid and password and finally comes back (after some timeout like 30 secs) with:

    System error 1326 has occurred.
    Logon failure: unknown user name or bad password.

    One of the return messages from Samba to XP contains (using wireshark):
    NT Status: STATUS_NOT_FOUND (0xc0000225)
    I guess this relates to the sid_to_uid failures above ?

    Does anyone have an idea how to fix or further debug this ?
    I have already spent hours studying posts I found on the net that had the same symptoms, unfortunately to no avail.

    Siggy

  2. #2
    Linux User cheesecake42's Avatar
    Join Date
    Jan 2007
    Location
    Orlando, FL
    Posts
    370
    This isn't necessarily a fix to your problem but have you considered using scp? I had a lot of trouble myself getting samba to do exactly what I wanted it to and ended up just installing winscp on my xp box and transfered files that way. It's a little more secure than ftp as well.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    2

    Re: Samba/CentOS/XP Problem

    Hi which version of samba you use?

    as far as i know there are some problems with versions below 3.x

    Well i use 3.4.6 on an gentoo box and it works fine..

    here is a litte code snipp of my smb.conf

    Code:
    [global]
            log file = /var/log/samba/samba.log
            passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n
            socket options = TCP_NODELAY
            obey pam restrictions = yes
            winbind trusted domains only = yes
            passdb backend = tdbsam
            passwd program = /usr/bin/passwd %u
            wins support = true
            dns proxy = no
            netbios name = SAMBASRV1
            server string = %h server (Samba %v)
            winbind enum users = no
            workgroup = WORKGROUP
    
    [windowsshare]
            guest account =
            valid users = nobody
            writeable = yes
            invalid users =
            path = /backupshare/windowsbackup
    and it woud be also a good idea to set Security Parameter to user , see below


    # "security = user" is always a good idea. This will require a Unix account
    # in this server for every user accessing the server. See
    # /usr/share/doc/samba-doc/htmldocs/ServerType.html in the samba-doc
    # package for details.
    ; security = user

    # You may wish to use password encryption. See the section on
    # 'encrypt passwords' in the smb.conf(5) manpage before enabling.

    # If you are using encrypted passwords, Samba will need to know what
    # password database type you are using.

    ; guest account = nobody

    therefore you can use standard Unix Accounts to control Access to the Samba Shares..

    with this it shoud be possible to connect to Samba Shares and use the datas on the Cent OS Box.. as it woud be a Windows Server

    Hope this helps

  4. #4
    Just Joined!
    Join Date
    Jun 2010
    Location
    AUS, East Coast
    Posts
    10
    The version is 3.0.33-3.29.el5_5. Seems to be a bit behind of what you use. This is what was installed automatically. I think I'll get a later version first before worrying more. (Security is set to user).

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    2

    Re:Samba/CentOS/XP Problem

    Quote Originally Posted by QF006 View Post
    The version is 3.0.33-3.29.el5_5. Seems to be a bit behind of what you use. This is what was installed automatically. I think I'll get a later version first before worrying more. (Security is set to user).
    Ok i know this automatic installation may sometimes fine but often it woud be better to take the task by hand which means download the source and configure and compile it.. thats what i've done on the gentoo box cause the ebuild (emerge) was also buggy and i loosed time for nothing..

    Good luck

  6. #6
    Just Joined!
    Join Date
    Nov 2005
    Posts
    14
    Are you using this as a stand alone samba server or are you in a network? What type of authentication do you use if you are in a LAN?

    I can guide you if you are looking for setting up samba shares for your users over the network.

    We have set up a Linux File Server based on Samba with AD authentication and it is in production for the last 18 months without any problems.

    If you want, I can put a how-to guide here which all can benefit from.

    Do reply.

    Saabir

  7. #7
    Just Joined!
    Join Date
    Jun 2010
    Location
    AUS, East Coast
    Posts
    10
    I'm using a 'standalone' setup (Windows Workgroup, no Windows server involved). Access from Linux to Windows works, but it doesn't in the opposite direction. What version of Samba are you using ?

    A how-to guide would always be a good thing to have, although I am quite confident that I have configured it correctly. There are not too many parameters.

    I now have gcc available and the Samba source code, how do I now recompile Samba (sorry, this is all a bit new to me, only just started running a Linux machine) ? Is it invoking 'configure' in the samba3 directory ?

    Siggy

  8. #8
    Linux Newbie unlimitedscolobb's Avatar
    Join Date
    Jan 2008
    Posts
    120
    Quote Originally Posted by QF006 View Post
    I now have gcc available and the Samba source code, how do I now recompile Samba (sorry, this is all a bit new to me, only just started running a Linux machine) ? Is it invoking 'configure' in the samba3 directory ?
    Usually doing ./configure && make and then make install works. Note that you may need elevated privileges to run the latter command. You may also need to supply some options to the configure script.

  9. #9
    Just Joined!
    Join Date
    Feb 2004
    Posts
    3
    Quote Originally Posted by QF006 View Post
    Am trying to access my newly setup CentOS box from XP using Samba. I think that Samba is correctly configured. I am using 'encrypted passwords' and security = user and have added a Samba user to map the XP user name to the Linux user name.

    Setting the smbd debug level to 10 only gives me the following output when trying a net use on XP:

    Code:
    [2010/07/19 19:46:18, 0] lib/util_sock.c:get_peer_addr(1224)
      getpeername failed. Error was Transport endpoint is not connected
    [2010/07/19 19:46:18, 0] lib/util_sock.c:get_peer_addr(1224)
      getpeername failed. Error was Transport endpoint is not connected
    [2010/07/19 19:46:18, 0] lib/util_sock.c:read_data(534)
      read_data: read failure for 4 bytes to client 0.0.0.0. Error = Connection reset by peer
    [2010/07/19 19:46:18, 1] auth/auth_util.c:create_token_from_username(1168)
      sid_to_uid for sschwarz (S-1-5-21-3602176571-387810723-1220632785-2000) failed
    [2010/07/19 19:46:22, 1] auth/auth_util.c:create_token_from_username(1168)
      sid_to_uid for sschwarz (S-1-5-21-3602176571-387810723-1220632785-2000) failed
    After that log output is generated, XP asks me for the userid and password and finally comes back (after some timeout like 30 secs) with:

    System error 1326 has occurred.
    Logon failure: unknown user name or bad password.

    One of the return messages from Samba to XP contains (using wireshark):
    NT Status: STATUS_NOT_FOUND (0xc0000225)
    I guess this relates to the sid_to_uid failures above ?

    Does anyone have an idea how to fix or further debug this ?
    I have already spent hours studying posts I found on the net that had the same symptoms, unfortunately to no avail.

    Siggy
    Hi,
    I think I know what the problem is: samba (version 3) reads the user's p/w from its own smbpasswd file, not from /etc/passwd. Use the mksmbpasswd.sh script to create smbpasswd file then restart samba.
    Good luck!

  10. #10
    Just Joined!
    Join Date
    Jun 2010
    Location
    AUS, East Coast
    Posts
    10
    Hi, thanks, this looked so promising, especially as I had not performed that step. Unfortunately it did not solve the problem. I am now seeing (in a file named wb-server_name.log) the following:

    Code:
    [2010/07/21 11:17:18, 0] nsswitch/winbindd_passdb.c:sid_to_name(126)
      Possible deadlock: Trying to lookup SID S-1-1-0 with passdb backend
    [2010/07/21 11:17:18, 0] nsswitch/winbindd_passdb.c:sid_to_name(126)
      Possible deadlock: Trying to lookup SID S-1-5-2 with passdb backend
    [2010/07/21 11:17:18, 0] passdb/pdb_tdb.c:tdbsam_open(829)
      tdbsam_open: Failed to open/create TDB passwd [/etc/samba/passdb.tdb]
    [2010/07/21 11:17:18, 0] passdb/pdb_tdb.c:tdbsam_getsampwrid(1106)
      tdbsam_getsampwnam: failed to open /etc/samba/passdb.tdb!
    [2010/07/21 11:17:22, 0] passdb/pdb_tdb.c:tdbsam_open(829)
      tdbsam_open: Failed to open/create TDB passwd [/etc/samba/passdb.tdb]
    [2010/07/21 11:17:22, 0] passdb/pdb_tdb.c:tdbsam_getsampwrid(1106)
      tdbsam_getsampwnam: failed to open /etc/samba/passdb.tdb!
    [2010/07/21 11:19:33, 0] nsswitch/winbindd_passdb.c:sid_to_name(126)
      Possible deadlock: Trying to lookup SID S-1-1-0 with passdb backend
    [2010/07/21 11:19:33, 0] nsswitch/winbindd_passdb.c:sid_to_name(126)
      Possible deadlock: Trying to lookup SID S-1-5-2 with passdb backend
    This is passdb.tdb:
    -rw------- 1 root root 4096 Jul 21 10:48 passdb.tdb

    Siggy

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •