-
sjorge
veg: I tried a dist upgrade in one of the bookworm images and a lot of things broke. Something in systemd (IIRC) wanted a feature that is not being emulated and just dies very early on in the init process.
-
sjorge
I didn'treally dig deep though
-
sjorge
As I'm ok on bookworm for now
-
ENOMAD
I'm seeing strange behavior in kclient when used against AD with IPv6 enabled.
pastebin.com/5ZJDV1RC
-
ENOMAD
any ideas? Is this a bug or am I just holding it wrong?
-
danmcd
At first glance, it's a bug/missing-feature. Do you know what *process* is failing?
-
danmcd
I see some $CMD/krb5 that has AF_INET6/AF_INET duality, but not ALL of it. WOuld be interesting to know what process is only using IPv4.
-
danmcd
"Failed to set account password." seems to be a difference.
-
danmcd
Ahh, I think I found the problem. Pardon the multi-line:
-
danmcd
kebe(lib/krb5)[0]% git grep -lw AF_INET
-
danmcd
kadm5/clnt/changepw.c
-
danmcd
kadm5/srv/chgpwd.c
-
danmcd
kebe(lib/krb5)[0]% git grep -lw AF_INET6
-
danmcd
kebe(lib/krb5)[1]%
-
danmcd
A fix in $LIB/krb5 is probably your first step.
-
ENOMAD
danmcd, I wish I knew which process was failing. <sigh>
-
ENOMAD
so should I be reporting this as an illumos bug?
-
danmcd
I actually don't need to know that now. I missed the output.
-
danmcd
Assuming it isn't already filed, yes.
-
danmcd
illumos.org/issues/17577 is the catch-all "Update our krb5, dammit."
-
fenix
→
BUG 17577: Kerberos code needs update (New)
-
danmcd
Your problem COULD MAYBE be fixed by whacking those two lib/krb5 files a bit.
-
danmcd
No bugs mention IPv6 by name.
-
ENOMAD
I bumped into this problem while trying to solve another (more important) one.
-
ENOMAD
should I add it to 17577 or create a new one?
-
danmcd
The `ksetpw` command is what's failing in your kclient (a shell script) invocation. That binary in $CMD calls one or both of the stuck-in-v4-only routines in $LIB.
-
danmcd
17577 states that Oracle open-sourced their formerly-in-ON krb5 bits, or at least the patches?
-
danmcd
Maybe a v6 patch is in there somewhere?!? I have no idea...
-
ENOMAD
I can work around this temporarily but it's going to bite us ($job[1]) fairly badly if we ignore it for too long.
-
ENOMAD
workaround being to add the DCs to /etc/hosts on the impacted servers.
-
richlowe
oracle moved kerberos into solaris-userland
-
richlowe
that would be the best source of knowing what the hell, because the diffs of kerberos v. upstream are a mess
-
richlowe
and the XXX comments left behind are also not easy to under
-
richlowe
stand
-
ENOMAD
new ticket time?
-
danmcd
Yes.
-
danmcd
I'm assuming that if you can get what we have to Just Speak IPv6 we're all good?
-
danmcd
That alone is worth a distinct ticket IMHO.
-
richlowe
yeah, that's probably fixable
-
richlowe
the krb5 upgrade probably needs someone like racktop with big AD stuff to deal with
-
richlowe
at least if they want it to still work afterward
-
ENOMAD
-
fenix
→
BUG 17809: kclient + AD + IPv6 = "Setup FAILED" (New)
-
danmcd
Please put your pastebin output in there. I'll update with how I got to the lib/krb5 bits.
-
ENOMAD
the pastebin output is already in there. That's 90% of the content. :)
-
ENOMAD
Now to go back to trying to figure out why ldap bind is failing <sigh>
-
ENOMAD
darnit. I was really hoping the computer account was the issue but nope, nscd is still failing to proxy bind to the AD servers.
-
ENOMAD
anyone using LDAP? Can you tell me the ownership and perms of /var/ldap/ldap_client_* please?
-
ENOMAD
I find it hard to believe it needs to be world readable but:
-
ENOMAD
Jan 6 13:08:01 testfs1 svc.startd[36]: [ID 293258 daemon.warning] libsldap: Status: 2 Mesg: Unable to load configuration '/var/ldap/ldap_client_file' ('').
-
ENOMAD
(FTR, making it world readable and rebooting did not get that error logged.)
-
jbk
it shouldn't -- ldap_cachemgr should be the only thing that needs to read it
-
jbk
the ldapclient command should create all of that for you
-
ENOMAD
I assumed it should be 0400 root:root but that generated the above error.
-
ENOMAD
jbk, it did generate it and gave it the 0400 perms.
-
jbk
the big one is the creds file -- that holds the password for binding
-
jbk
(and the DN of the account to bind to)
-
ENOMAD
there's no error with ldap_client_cred being 0400 root:root.
-
ENOMAD
I'm going to put 0400 back on ldap_client_file and restart and see if the error comes back.
-
ENOMAD
I take it back. I'm still getting that can't load error even with world-read perms on the file.
-
ENOMAD
so something ldapclient is writing is upsetting it, I guess.
-
ENOMAD
I think that error was a red herring.
-
jbk
i think you can run ldap_cachemgr with the -g flag (I think that's it) that'll tell you the status of the configured servers
-
ENOMAD
thanks. I'm currently rebuilding testfs1 but I'll give that a try when I'm back to that stage.
-
ENOMAD
I *think* it is actually working... partly. getent passwd returns some users but not all.
-
jbk
are you trying to allow AD accounts to login to the system?
-
ENOMAD
login? no.
-
ENOMAD
This is a fileserver, I need smb to work.
-
ENOMAD
our current system is causing $boss upset because it uses NTMLv2 and he doesn't like that.
-
jbk
why not just use smbadm join ?
-
ENOMAD
(it uses a simple smbadm join)
-
ENOMAD
jbk: that's the thing that's causing the NTMLv2 propblem.
-
jbk
at least recent versions should setup all of the kerberos bits
-
ENOMAD
it does, but for whatever reason we're still getting alerts logged on the DC.
-
jbk
IIUC, that's a client thing -- you have to connect using the FQDN to get the client to use kerberos
-
ENOMAD
fqdn for the client or the server? ... I swear I tried that but maybe I'm just an idiot.
-
jbk
you might want to set the minimum smb verson to 2.1 if you haven't done that
-
ENOMAD
I presume that's different from setting lmauth_level=5?
-
ENOMAD
(I have this vague memory or setting smb version to 2.1 years ago but I don't see anything in my notes about it.)
-
tsoome_
check sharectl get smb
-
jbk
yeah -- if you send an email to illumos-discuss, I might be able to prod Gordon to answer with more detail since he knows all the details..
-
jbk
if he doesn't see it himself
-
ENOMAD
min_protocol=2.1
-
jbk
but I do recall if you connect to the share using something like \\IPADDR\SHARE, that _does_ use NTLM, and you have to use \\SERVER.FQDN\SHARE (while required, that might not be sufficient)
-
ENOMAD
looks like we're not specifying the name of the DC in our join command. just -u admin_username doma.in.name
-
ENOMAD
oh yeah, that's... unlikely :)
-
ENOMAD
our users love their go to the DNS CNAME \\fs then browse.
-
jbk
yeah -- smbadm join should do DNS SRV lookups on the domain name to locate the DCs
-
jbk
(I think the bits to make it site aware are also upstreamed if you're using sites)
-
ENOMAD
smbadm doesn't have an option to specify DC for the join command and given the \\IPADDR comment I'm guessing that's not relevant anyway.
-
jbk
I mean, clients going to \\IPADDR are going to use NTML
-
jbk
when you do smbadm join
-
jbk
it's going to do the DNS SRV lookups
-
jbk
create the keytab
-
jbk
etc
-
ENOMAD
sadly, I have no way to force the clients to use the long name.
-
ENOMAD
FQDN
-
ENOMAD
I wonder if that's still going to be a problem if I get this new configuration working. :(
-
jbk
I'd still ask -- ISTR that it's the SMB _client_ (i.e your desktops) that decide to use NTLM or kerberos -- I'm not sure that the server can force the behavior
-
» ENOMAD nods
-
ENOMAD
I'll try to write a concise question to post ... tomorrow.
-
ENOMAD
I've been busting my head against this LDAP stuff for several days and I'm not sure what's what anymore.
-
jbk
or just clean up everything and try smbadm join
-
ENOMAD
(the host join bug didn't help.)
-
jbk
it'll also configure idmap to talk to AD using LDAP using SASL/gssapi
-
ENOMAD
the thing is, the DC is logging the complaint against the file server, not the client.
-
jbk
(for historical reasons, for smb sharing idmap is the thing that actually does all the LDAP lookups)
-
jbk
yeah, when an smb client connects, the server has to basically forward the request to the DC to validate it
-
ENOMAD
I tripped over that idmap setting at some point but figured I'd get there after I got rid of the binding error being logged in /var/adm/messages first.
-
jbk
if you're doing smb, you don't need ldap/client or any of that...
-
ENOMAD
I'll need to go back through the documentation and find that setting again.
-
ENOMAD
for now I'm trying to follow
omnios.org/setup/ad-connect but it's for non-SSL connections so I'm ... adapting.
-
jbk
if you're trying to share a given share via both SMB and NFS, you'll need to configure idmap to lookup the correct attributes in AD
-
ENOMAD
nope, I refuse to share via both.
-
ENOMAD
they get one or the other, not both.
-
jbk
yeah, for smb, it doesn't use SSL or TLS
-
ENOMAD
To the point where I have separate servers for NFS & SMB.
-
jbk
it uses gssapi
-
ENOMAD
I don't suppose there's a simple cookbook document about this :)
-
jbk
svcadm enable smb/server idmap; smbadm join -u <User with creds> domain.name
-
jbk
that really should be all you need as long as DNS is configured
-
ENOMAD
that's what I have been doing for the past several years.
-
jbk
well and ntp (because kerberos)
-
ENOMAD
but, like I said, $boss wants the NTML alerts to stop.
-
ENOMAD
previous setup: svcadm refresh ntp; svcadm enable -r smb/server ; sharectl set -p max_workser=2048 smb, sharectl set -p lmauth_level=5 smb ; sharectl set -p ipv6_enable=true smb ; smbadm join -u ... ; and then a bunch of idmap
-
ENOMAD
oh, and cp /etc/nsswitch.ad /etc/nsswitch.conf
-
jbk
ad shouldn't be needed for the most part (nss_ad.so really needs to be rewritten, but that's a _long_ story)
-
tsoome_
silly question... but have you tried to block client(s) to use NTLM?
-
jbk
you mostly need it if you have RFC2307 attributes in AD (or equivalent) and want to have people login to a system using their AD creds
-
jbk
except that it duplicates (poorly) a lot of logic in idmap (so it doesn't handle down DCs nearly as well as idmap)
-
ENOMAD
tsoome_, I have not done that. Until a few minutes ago I thought this was a server problem.
-
ENOMAD
tsoome_, If you want to save me a bunch of googling and know the command(s) to try for that I'd appreciate it :)
-
tsoome_
I mean, first for debugging, because the client fall back to NTLM if kerberos fails....
-
ENOMAD
hmm... thinking about this... the test host doesn't have any clients talking to it yet so why would it be generating those errors?
-
tsoome_
do not know the commands without google:D
-
ENOMAD
right now I'm trying to google how to set idmap to sasl/gssapi and ... end of day brain isn't helping.
-
jbk
you shouldn't need to do that -- smbadm join takes care of that for you
-
jbk
it doesn't use ldap_cachemgr or ldap/client
-
ENOMAD
then the existing server (which uses smbadm join) should already have done that.
-
jbk
idmap creates its own ldap connections
-
jbk
and has it's own config stored in smf
-
jbk
you should see things like info about the machine account, etc if you do a listprop on the idmap service
-
jbk
basically there's a lot of discovery via DNS SRV records that are used to locate AD DCs
-
jbk
idmap does all of that, and will handle locating a new DC if the one it's currently usign dies
-
ENOMAD
listprop doesn't have anything with 'sasl' in it (grep -i)
-
ENOMAD
svccfg -s svc:/system/idmap listprop - right?
-
jbk
it's basically baked in
-
jbk
you should see things lik config/machine_uuid, config/machine_sid, and config/domain_name populated
-
ENOMAD
yep, I'm seeing those
-
jbk
and you should already have /etc/krb5/krb5.keytab populated with principals for the FQDN of the machine
-
ENOMAD
yep, with DES, ArcFour, AES-128, and AES-256 options.
-
ENOMAD
for host, cifs, HOSTNAME$, nfs, HTTP, and root
-
ENOMAD
I just checked the logs, we're seeing these alrts for fs2 and hvfs2 - both of which have no clients (they're test hosts).
-
ENOMAD
I think I'm going to stop with this for the day and pick up 'fresh and clean' tomorrow.
-
jbk
smbadm list-sessions
-
jbk
make sure of that
-
ENOMAD
: || lvd@fs2 ~ [502] ; sudo smbadm list-sessions
-
ENOMAD
Password:
-
ENOMAD
: || lvd@fs2 ~ [503] ;
-
ENOMAD
same for hvfs2. If they'd had sessions I'd have been very surprised.
-
ENOMAD
specifically, $boss is auditing for" LogName = 'Microsoft-Windows-NTLM/Operational' Id = 4023"
-
tsoome_
"Check for Missing SPNs: Often, NTLM fallback occurs due to missing or incorrect Service Principal Names (SPNs). Ensure SPNs are correctly registered for the services in Active Directory."
-
ENOMAD
any suggestions on how to do that?
-
tsoome_
spn is basically service/host.domain format name (or service/host)
-
tsoome_
so you would need to fetch all ldap entries for host:)
-
tsoome_
but, I'm not quite sure why is your test server generating those NTLM audit records. Thats something one should dig from source and NTLM related docs - maybe some sort of session setup or whatever like that....
-
tsoome_
to disable NTLM from illumos server side... I'd check with gwr as suggested:)
-
ENOMAD
setspn -L hostname returns a lot of things but I'm ignorant of their meaning. More reading.
-
ENOMAD
I'll start drafting that email but suspect it won't go out until I've had time to review it in the morning.
-
tsoome_
some years ago I had to set up AD auth for solaris, but that was just for user access (ldap + kerberos) and havent touched AD later:)
-
ENOMAD
in my ideal world I wouldn't be touching AD ...