Home › Forums › OS X Server and Client Discussion › Active Directory › 10.4.8 Intel – AD, Samba kerberos machine password
- This topic has 24 replies, 12 voices, and was last updated 15 years, 8 months ago by
pepijn.
-
AuthorPosts
-
January 15, 2007 at 7:08 pm #368003
at1
ParticipantDear AFP548’s
Hope you can help with this perplexing problem
I have been experimenting with the setup of a single intel xeon Xserve running 10.4.8 in an existing windows 2000 AD Domain using the instructions laid out in Mike Bombich’s Leveraging AD on Mac OS X white paper and the OS/AD integartion paper form this site..
Single Sign On seems to be workng well from the mac clients for login and afp shares (and prefrence managemnet via wgm), but samba authentication seems to be broken for Mac and PC clients.
I am confident the AD server binding process has worked as i am able to logon to the server locally using an AD domain admin account and have kerberizeed access to smb shares on the existing windows 2000 servers.
I have lookad at my smb.conf file and everything apers correct, dns is working properly and i have checked the domain controller group policy opjects that control encryption settings as detailed here <https://www.afp548.com/forum/viewtopic.php?forum=24&showtopic=6275>
in my smb logs i see this when i first start samba
[2007/01/14 19:45:05, 2] /SourceCache/samba/samba-100.5/samba/source/lib/interface.c:add_interface(79)
added interface ip=192.168.0.248 bcast=192.168.0.255 nmask=255.255.255.0
[2007/01/14 19:45:05, 2] /SourceCache/samba/samba-100.5/samba/source/lib/interface.c:add_interface(79)
added interface ip=192.168.0.28 bcast=192.168.0.255 nmask=255.255.255.0
[2007/01/14 19:45:05, 2] /SourceCache/samba/samba-100.5/samba/source/lib/tallocmsg.c:register_msg_pool_usage(57)
Registered MSG_REQ_POOL_USAGE
[2007/01/14 19:45:05, 2] /SourceCache/samba/samba-100.5/samba/source/lib/dmallocmsg.c:register_dmalloc_msgs(71)
Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED
[2007/01/14 19:45:06, 0] /SourceCache/samba/samba-100.5/samba/source/libads/kerberos.c:ads_kinit_password(146)
kerberos_kinit_password host/[email protected] failed: Client not found in Kerberos database
[2007/01/14 19:45:06, 0] /SourceCache/samba/samba-100.5/samba/source/printing/nt_printing.c:nt_printing_init(386)
nt_printing_init: error checking published printers: WERR_ACCESS_DENIED
[2007/01/14 19:45:06, 2] /SourceCache/samba/samba-100.5/samba/source/smbd/server.c:open_sockets_smbd(335)
waiting for a connectionand we see this in the smbd.log when the clients try to logon to smb shares on the xserve
[2007/01/15 12:10:12, 2] /SourceCache/samba/samba-100.5/samba/source/passdb/pdb_interface.c:make_pdb_methods_name(654)
No builtin backend found, trying to load plugin
[2007/01/15 12:10:12, 2] /SourceCache/samba/samba-100.5/samba/source/lib/module.c:do_smb_load_module(63)
Module ‘/usr/lib/samba/pdb/opendirectorysam.so’ loaded
[2007/01/15 12:10:12, 2] /SourceCache/samba/samba-100.5/samba/source/smbd/reply.c:reply_special(235)
netbios connect: name1=XSERVE name2=CLIENTNAME
[2007/01/15 12:10:12, 2] /SourceCache/samba/samba-100.5/samba/source/smbd/reply.c:reply_special(242)
netbios connect: local=xserve remote=xserve, name type = 0
[2007/01/15 12:10:12, 1] /SourceCache/samba/samba-100.5/samba/source/smbd/sesssetup.c:reply_spnego_kerberos(184)
Failed to verify incoming ticket!
[2007/01/15 12:10:12, 2] /SourceCache/samba/samba-100.5/samba/source/smbd/server.c:exit_server(595)
Closing connectionsNB: the name2= is the apple computer name of the client mac and NOT the computer name of the machiine registered with AD
On the windows 2000 domain controlller we see this error in the system log
Event Type: Error
Event Source: NETLOGON
Event Category: None
Event ID: 5722
Date: 15/01/2007
Time: 11:53:49
User: N/A
Computer: ATLAS
Description
The session setup from the computer XSERVE failed to authenticate. The name of the account referenced in the security database is XSERVE$. The following error occurred:
Access is denied.From all this i summise that there is a probelm with the credentials samba uses to register itself with the domain server when smaba starts. when the client tries to log on the server, cant access the AD domain server for authentication, so looks up cedentials in the local password database on the xserver and denies the connction when this check fails
I found this posting which looked promising,
<https://www.afp548.com/forum/viewtopic.php?showtopic=15961>but am vey confused as to where i am supposed to modify the secrets.tdb file, i have tried a few options but with no sucess
anyone have an idea how i might fix this?
Is this a known bug with the 10.4.8 Intel build of samba? i have seen a small number of similar postings on this list, apple’s mailing list and te macenterprise list that woud suggest this is the case
thanks in advane
Alasdair
January 18, 2007 at 7:02 am #368032at1
ParticipantDear All
Looks like this is a bug with the 10.4.8 Intel build of Mac os x server
This bug causes the samba machine password stored in secrets.tdb to be stored in a malformed state
This problem was identified and the solution graciously provided by Matt Jeens of Toucan Computing in the UK
If you run
tdbdump /var/db/samba/secrets.tdbyou can see your existing machine password
An example of broken entry created when you bind the server using Directory Access looks like this;
key = “SECRETS/MACHINE_PASSWORD/TOUCANTEST”
data = “h)j8q6hWaCuVeQ”to fix this malformed password, you need an expect script to make ‘net changesecretpw’ non-Interactive:
#!/usr/bin/expect -f
#Hack to change samba machine password non-interactively
set machinepw [lindex $argv 0]
spawn net -f changesecretpw
expect “password:”
send “$machinepw\r”
expect eofsave this as ‘changesecret’ somewhere and make it executable.
stop samba from server admin, then run the following command as root
changesecret $(defaults read /Library/Preferences/DirectoryService/ActiveDirectory “AD Computer Password”| /usr/bin/tr -d “< >” | /usr/bin/xxd -r -p)
Which should set the password appropriately.
run tdbdump again to view the new password:
tdbdump /var/db/samba/secrets.tdb
A fixed entry looks like this:
key = “SECRETS/MACHINE_PASSWORD/TOUCANTEST”
data = “h)j8q6hWaCuVeQ\00”note the \00 NULL at the end of the data.
I recommend restart your server before testing this has worked
NB, i found that i had to use the FQDN of the Xserve when accessing shares from PC clients (although this may be unrelated issue) using just the hostname failed for me
hope this helps anyone experiencing this annoying issue
January 20, 2007 at 12:30 am #368042mdporter
ParticipantI tried this script and it did not work.
Called Apple and was told that they are aware of the problem, so at least there is something to look forward too.
Issues like these make it really hard to reliably integrate Apple software into a windows enterprise.
January 20, 2007 at 2:27 am #368044at1
ParticipantSorry slight amendment due to html bugs
A broken secrets.tdb entry looks like this:
key = “SECRETS/MACHINE_PASSWORD/TOUCANTEST”
data = “h)j8q6hWaCuVeQ”A fixed secrets.tdb entry should look like this:
key = “SECRETS/MACHINE_PASSWORD/TOUCANTEST”
data = “h)j8q6hWaCuVeQ0/00”note the /00 NULL at the end of the data.
Sorry it did not work for you, i had the luxury of being able to scrub my server and build it up again which i’m sure helped
what happens when you run the script? did you see any errors in the logs or terminal window?
do you see the null value in secrets.tbd after you run the script?
January 20, 2007 at 2:36 am #368045mdporter
ParticipantThe script doesn’t show any errors. The password field doesn’t show the null character after running it. Is the script supposed to ask for a new password, or does it attempt to use the existing password?
I tried this on a server I built fresh for the purpose of testing any fixes that might be available.
January 20, 2007 at 2:57 pm #368047at1
ParticipantHI
Looks like the script and command also got mangled a little by the http in this forum
apologies again for not spotting this earlier#!/usr/bin/expect -f
#Hack to change samba machine password non-interactively
set machinepw [lindex $argv 0]
spawn net -f changesecretpw
expect “password:”
send “$machinepw\r”
expect eofso save that somewhere and make it executable.
You can then run the following as root:
changesecret $(defaults read /Library/Preferences/DirectoryService/ActiveDirectory “AD Computer Password”| /usr/bin/tr -d “< >” | /usr/bin/xxd -r -p)
i copied this script verbatim, when run with the command above it changes the password without any further input required
try it again, it 100% worked for me
February 2, 2007 at 4:39 am #368190jeg98
ParticipantGreetings!
I have been struggling with an Intel Xserve bound to an Active Directory domain. It seems to pass AD account info to the AD server from authenticating Macs without any problem. However, it is flaky with Windows users. And connecting to the Xserve via SMB from Macs doesn’t work either.
I see different errors on the Tiger Server side than “at1” reported, but I do see the same errors on the Windows domain controllers (2 of them, actually).
I’m not sure about the fubarred machine password, though. When I run the tdbdump command, I don’t see the null characters, but then, I don’t see those characters on a Panther server that is also bound to the domain. That may or may not be relevant, though.
From looking at the password in the Active Directory prefences, I’m guessing that the different files encode the text differently, as they look nothing alike. I’m not slick enough to recognize if the password in the AD pref file has the null character there or not.
This sure is a pain! : )
Who at Apple mentioned the known bug with Intel 10.4.8 server? I called Apple today, but our support agreement doesn’t cover AD integration. That’s at least $699 (for one incident!). Yikes.
Good luck.
February 2, 2007 at 6:52 pm #368193gverhoff
ParticipantI wouldn’t bother paying the fee, if you’ve got other ppc 10.4.8 servers working, let apple fix their own bug on their dime. I’ve had our Sales Rep and his SE escelate the issue with Apple and haven’t heard of any kind of fix yet.
I haven’t gotten the above script to work either so i’m just sitting on it till 10.4.9 or my SE comes back with a fix. Not a lot of encouragement here, but maybe i can save you a buck or 2.
I’ve had my apple rep tell me it’s a known bug, the folks at apple care are great usually but they’re trained to hear active directory and say $699 please!!
In my opinion it’s a bug if i can get the 10.4.8 ppc working but not the intel 10.4.8. I would seriously doubt that it’s a configuration issue vs a software bug issue.
February 2, 2007 at 9:15 pm #368194ryanbe15
ParticipantWe had a problem similar to this with out test environment. It comprised of 1 Server 2003 (acting as DC,DNS,and DHCP), 1 OD master, and one osx client. AFP worked fine over the OD master just when we tried to hit any SMB share on the DC it would give us wrong username and password. Issue had to deal with a GPO on DC’s a.
if you browse to these location….MAKE SURE THEY ARE DISABLED!
Default Domain Controller Security Settings -> Security Settings -> Local Policies -> Security Options -> Microsoft network server: Digitally sign communications(always)
b. Default Domain Security Settings -> Security Settings -> Local Policies -> Security Options -> Microsoft network server: Digitally sign communications(always)after we set these GPO location to disabled all is well with SMB/CIFS on a DC.
February 5, 2007 at 5:48 am #368208bronga_tom
ParticipantFresh out of the box Intel Xeon server running 10.4.8 connected to a XRAID and bound to AD. Mac users logged in very quickly. Windows and Macs couldn’t connect using SMB. Same type of windows errored were logged.
Thanks for the very helpful information. I ran tdbdump and saw no /00 NULL at the end of the secret password. Next I stopped Windows File Services. I created the change secret password script. Made the script executable. Ran it using the above command and checked the tdbdump again. This time the /00 NULL was present. Restarted the xserve and restarted Windows File Services. Now PCs and Macs can login.
Outstanding information. Thanks for posting! Wish Apple did the same.
February 6, 2007 at 5:41 pm #368234jeg98
ParticipantTo Mr. Bronga,
What kind of errors were you seeing on your Xserve in the smbd log file? I’m curious if you were seeing the NETLOGON failures there as well.
So far we’ve continued to have intermittant funkyness with Windows users connecting/authenticating.
I also just checked on another Tiger server running on a G4 and the null characters are not part of the AD machine password in the secrets file. So, I have a Panther server bound to AD and a Tiger server bound to AD (both on PPC Macs) that don’t show the null character in their machine password.
However, Mr. Bronga went from not working to working by fixing that.
What do you see in your smbd logs after fixing the password?Thanks to those that have continued to post.
-John
February 6, 2007 at 9:36 pm #368237bronga_tom
ParticipantBear with me as I am a teacher, not a trained IT pro. Windows File Service logging is set on medium. I searched for NETLOGON in all my samba logs and found nothing. I am still seeing lots of smb errors now that are related to smb clients, not the server. I plan to remove these clients from the domain and re-add them to AD.
It seems that there may be more relevant infomation in the [b]log.winbindd[/b] file-
Heres the log.winbindd. [i]before[/i] the “fix”Copyright The Samba Team 2000-2004
[2007/02/02 17:30:01, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd_util.c:init_domain_list(327)
Could not fetch sid for our domain ASD
[2007/02/02 17:30:02, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd.c:main(864)
winbindd version 3.0.10 started.
Copyright The Samba Team 2000-2004
[2007/02/02 17:30:02, 0] /SourceCache/samba/samba-100.6/samba/source/lib/pidfile.c:pidfile_create(91)
ERROR: winbindd is already running. File /private/var/run/winbindd.pid exists and process id 348 is running.
[2007/02/03 11:26:41, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd.c:main(864)
winbindd version 3.0.10 started.
Copyright The Samba Team 2000-2004
[2007/02/03 11:26:44, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd_util.c:init_domain_list(327)
Could not fetch sid for our domain ASD
[2007/02/03 11:26:45, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd.c:main(864)
winbindd version 3.0.10 started.
Copyright The Samba Team 2000-2004
[2007/02/03 11:26:45, 0] /SourceCache/samba/samba-100.6/samba/source/lib/pidfile.c:pidfile_create(91)
ERROR: winbindd is already running. File /private/var/run/winbindd.pid exists and process id 288 is running.
[2007/02/05 16:04:29, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd.c:main(864)
winbindd version 3.0.10 started.[b[i]AFTER[/i]the “fix”[/b]
Copyright The Samba Team 2000-2004
[2007/02/05 16:04:33, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd_util.c:init_domain_list(327)
Could not fetch sid for our domain ASD
[2007/02/05 16:04:34, 1] /SourceCache/samba/samba-100.6/samba/source/nsswitch/winbindd.c:main(864)
winbindd version 3.0.10 started.
Copyright The Samba Team 2000-2004
[2007/02/05 16:04:34, 0] /SourceCache/samba/samba-100.6/samba/source/lib/pidfile.c:pidfile_create(91)
ERROR: winbindd is already running. File /private/var/run/winbindd.pid exists and process id 320 is running.[i][/i]February 6, 2007 at 10:35 pm #368238jeg98
ParticipantTom,
Thanks for the log file posting. And, hey, kudos to you for getting it to work. “Just a teacher”. Don’t underestimate yourself. : )
Anywho, there doesn’t seem to be much difference in your log.winbindd from before and after the change. Or is there something I’m missing?
We have similar errors in our log.winbindd. I haven’t studied them long enough yet to determine any correlation between the entries there and other events (e.g.- events in the AD domain controller; Win or Mac users trying to connect via SMB). In general, we seem to have fewer entries regarding not being able to fetch the SID for the domain.
Our Windows service is also set at “Medium” logging (logging level 2 if you examine your smb.conf file). I am surprised that you don’t have any NETLOGON errors in your log.smbd, but hey, if you don’t, you don’t (have you tried to reload it? you might be asked how much data you want to see and could then look further into the past).
In Server Admin, for the Windows service and General tab, what is the role of your server? Ours is set as a Domain Member.
We don’t want our Xserve to do anything other than pass the Active Directory account information to the domain controller for authentication when accessing the shares. Generally works fine for Macs over AFP, but SMB on Macs or Windows users is off and on.Earlier today I had to unbind the server and rebind it to the domain. There is definitely something funky with the Xserve’s computer account in the domain, but I can’t tell if it is the password null bit issue, something else entirely, or a combination.
Sigh.
Thanks for your time.
-John
February 7, 2007 at 7:05 am #368242bronga_tom
ParticipantSorry John- I had trouble posting the logs and cut them down too much. The intel xserve is a Domain Member. We also have DC handle the auth Here’s some more log info:
Before the fix:
[2007/02/02 17:24:26, 0] /SourceCache/samba/samba-100.5/samba/source/libads/kerberos.c:ads_kinit_password(146)
kerberos_kinit_password host/[email protected] failed: Client not found in Kerberos database[2007/02/03 11:30:28, 1] /SourceCache/samba/samba-100.5/samba/source/smbd/sesssetup.c:reply_spnego_kerberos(261)
Username ASDK12.ORG\EB-BRONGA-DELL$ is invalid on this systemAfter the fix:
[2007/02/03 11:30:22, 1] /SourceCache/samba/samba-100.5/samba/source/smbd/service.c:make_connection_snum(648)
10.57.17.177 (10.57.17.177) connect to service bronga_tom initially as user bronga_tom (uid=2060939385, gid=2040171495) (pid 421)What does your secrets.tdb data file show when you run run tdbdump?
March 3, 2007 at 3:59 am #368453A-bomb
ParticipantDearest Gods,
[b]I ran this, got the password:[/b]
sudo tdbdump /var/db/samba/secrets.tdb[b]I created this with TextWrangler and saved it in /usr/bin as a executable file:[/b]
#!/usr/bin/expect -f
#Hack to change samba machine password non-interactively
set machinepw [lindex $argv 0]
spawn net -f changesecretpw
expect “password:”
send “$machinepw\r”
expect eof[b]I ran this:[/b]
sudo changesecret $(defaults read /Library/Preferences/DirectoryService/ActiveDirectory “AD Computer Password”| /usr/bin/tr -d “< >” | /usr/bin/xxd -r -p)[b]I ran this again but the output was simply “\00” for the password:[/b]
sudo tdbdump /var/db/samba/secrets.tdb[b]Rebooted but the password stayed as “\00″[/b]
[b]Please, please tell me what I’m doing wrong, even if you feel the need to state the very obvious like creating the script[/b]
😐 -
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed