Weblog entry #2 for eric

samba + active directory
Posted by eric on Wed 16 Nov 2005 at 14:29
Tags: none.
I'm currently trying to use a debian server to share data to Windows clients. So I use samba 3 + winbind to join my server to the Win2k domain with Active Directory.

The server joined the domain well. (# net join ads -U administrator), but winbind can't use AD to return the users or groups in my domain.
I got :
# wbinfo -u
Error looking up domain users
everytime.

Does anybody around here knows what I have to check or to do to make it works ? I am really blocked because here we got mostly windows servers, and I don't want to confine linux ones to web servers. Sharing files is an important need, so I need to be able to authenticate users against our AD domain.

thanks to all...

 

Comments on this Entry

Posted by simonw (84.45.xx.xx) on Thu 17 Nov 2005 at 21:20
[ Send Message | View Weblogs ]
Have you done "net join...." ?

This is covered in the Samba HOWTO. It isn't easy, you just have to plough through it - no short cuts.

[ Parent | Reply to this comment ]

Posted by eric (82.255.xx.xx) on Fri 18 Nov 2005 at 15:44
[ Send Message | View Weblogs ]
yes, i have done "net join ads -U administrator" and it works. i have also configured kerberos (/etc/krb5.conf) and I can do a "kinit administrator@REALM" and it works.
The only problem I got (but it's essential !) is with winbind.

I have read and looked and searched in the samba 3 howto many times, but I still can't find what is wrong.
I think I will try with another distro to see if the problem is debian based or... i don't know, maybe samba based or it's our windows configuration, architecture, something...

[ Parent | Reply to this comment ]

Posted by simonw (84.45.xx.xx) on Fri 18 Nov 2005 at 17:44
[ Send Message | View Weblogs ]
"I think I will try with another distro to see if the problem is debian based or..."

Well it works in Sarge for our fairly vanilla ADS set up, 2 x W2K ADS servers.

The winbind stuff worked without the need to have the Kerberos stuff configured.

A quick search suggests that the shortname of the server is needed in /etc/hosts, and I suspect you'd have to check "security=ADS", and that the DNS settings for the ADS domain are correct.

Just check the settings carefully, and be aware of all sorts of daft case sensitivity with Kerberos.

[ Parent | Reply to this comment ]

Posted by eric (82.255.xx.xx) on Fri 18 Nov 2005 at 17:58
[ Send Message | View Weblogs ]
Well it works in Sarge for our fairly vanilla ADS set up, 2 x W2K ADS servers.
aie, first problem, i think we have a strong ADS configuration with a big forest and a lot of child domains, and maybe (I hope not) the LDAP 'schema' have been changed.

The winbind stuff worked without the need to have the Kerberos stuff configured.
euh ? strange... i thought kerberos was mandatory to login to an AD domain, isn't it ?
A quick search suggests that the shortname of the server is needed in /etc/hosts, and I suspect you'd have to check "security=ADS", and that the DNS settings for the ADS domain are correct.
I got the entries in /etc/hosts, but not sure if short or long hostname.
security=ADS is ok
Just check the settings carefully, and be aware of all sorts of daft case sensitivity with Kerberos. I'll check the rest of the stuff you talk about for errors. but this will be Monday now...

Ok, so Monday... the story continue...

ps : excuse my language, i'm a non-native english speaker.

[ Parent | Reply to this comment ]

Posted by simonw (84.45.xx.xx) on Fri 18 Nov 2005 at 18:28
[ Send Message | View Weblogs ]
"euh ? strange... i thought kerberos was mandatory..."

I think winbind cheats and remembers your admin password in plaintext or something equally hideous. I wasn't impressed.

[ Parent | Reply to this comment ]

Posted by plovs_ (62.85.xx.xx) on Mon 21 Nov 2005 at 12:51
[ Send Message ]
Configure nsswitch.conf to look like this:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.

passwd:         compat winbind
group:          compat winbind
shadow:         compat

etc
Use wbinfo -t for trust status, if this is not ok, use: smbclient -L localhost -U%, check if you did not accidently become a domain controller. Also check the log-files. And restart winbind as well, not just samba!

[ Parent | Reply to this comment ]

Posted by eric (194.2.xx.xx) on Tue 22 Nov 2005 at 15:41
[ Send Message | View Weblogs ]
My nsswitch.conf is like yours.

and I got
# wbinfo -t
checking the trust secret via RPC calls failed
error code was (0x0)
Could not check secret

and I check, I'm not a domain controller !!!

I looked at the Samba-3 By Example guide, following step by step the configuration for AD membership (chap 10), and everything works ok, until point 11 page 274.
the only difference is, when joining the domain, I got, between the message Using short name... and Joined 'SERVER' ..., I got a lot of :
libads/kerberos.c: get_service_ticket (337)
get_service_ticket: kerberos_kinit_password SERVER$@REALM.DOMAIN.TLD@REALM.DOMAIN.TLD failed: Preauthentication failed

error messages !

I am a little bit blocked and I don't like that !
I'm gonna look one more time to the Samba 3 Howto and check another time all my settings...

[ Parent | Reply to this comment ]

Posted by philcore (70.161.xx.xx) on Wed 23 Nov 2005 at 03:32
[ Send Message | View Weblogs ]
I had a bit of a problem setting this up myself. Been a while. Does getent passwd list any windows users? Here some relevant lines from my smb.conf.
   winbind separator = +
   idmap uid = 10000-20000
   idmap gid = 10000-20000
   winbind enum users = yes
   winbind enum groups = yes
   winbind use default domain = yes
   security = ADS
   realm = MY.REALM.COM

[ Parent | Reply to this comment ]

Posted by eric (194.2.xx.xx) on Mon 28 Nov 2005 at 08:51
[ Send Message | View Weblogs ]
I got these lines too. but 'getent' or 'wbinfo -u' returns no users from my windows AD domain.
I'm lost........ and a little bit desesperate...

[ Parent | Reply to this comment ]

Posted by phildebian (81.242.xx.xx) on Mon 2 Jan 2006 at 10:35
[ Send Message ]
did you finally find the solution ?
I lock on the same problem !

Will be happy to get answer from a friendly boy (of girl !!)

Thank you

[ Parent | Reply to this comment ]

Posted by Anonymous (80.80.xx.xx) on Tue 14 Feb 2006 at 14:35
Looks like DNS problem. Configure Debian server to use AD's DNS.

[ Parent | Reply to this comment ]

Posted by Anonymous (24.213.xx.xx) on Mon 27 Feb 2006 at 04:58
Hey there,

I am running CENTOS 4.2...turns out winbind was dead, I (in my own half dead stupidity) clicked 'start winbind service' in the services menu...didn't notice it said winbindd half dead or some jibberish.

type wbinfo -p it should say '[root@FATHOM samba]# wbinfo -p
Ping to winbindd succeeded on fd 4

Or something similar...the first time I tried I got
[root@FATHOM samba]# wbinfo -p
Ping to winbindd failed on fd -1
could not ping winbindd!


I had the exact same problem and everything works now...since I only found this site while googling I'll probably never hear if you get this fixed :s Hopefully this helps you!

[ Parent | Reply to this comment ]

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search