The Samba-Bugzilla – Bug 7736
request: allow net user to set userPrincipalName
Last modified: 2015-07-31 09:00:36 UTC
Using "Active Directory Users and Computers" in windows, whenever you
add a new user, it requires you to fill in the information needed for
userPrincipalName and it is added to the LDAP entry for the user.
Is it possible to have net newuser create the userPrincipalName from the
sAMAccountName and the domain (extended.example.com) and store it so
that it is always there without having to create it?
I am using userPrincipalName in an S4 setup with email servers and other things. It would be greatly appreciated if it were possible to either have this automatically created or a simple way of creating and/or setting it without mucking around with ldbedit.
you did some work on the "net" tool. Do you have interest on implementing this?
But of course :). Expect a patch soon
Patch should soon go into "master".
This patch didn't affect provisioning of a domain. userPrincipalName isn't set by provisioning. Should I open a new bug, or is this good enough?
On which objects do you miss the "userPrincipalName" after a fresh provision? The default "Administrator" and/or "Guest"? The domain controller object?
Please point out these and we will try to fix it.
administrator and Guest at least. Sorry that I forgot this in my initial rerequest.
Very strange. I've tried to control the "userPrincipalName"s associated on both the default "Administrator" and "Guest" and there are not set - this is a Windows Server 2008.
Could it be that you have installed MS Exchange as well on your Windows Servers?
I cannot say that it is normal behavior. But any creation of a user account by normal means does create this. I figured that provision, creating those accounts, should do the same. If not, ok. I will have to remember to do it myself as much of my setup requires UPNs.
Created attachment 8190 [details]
Patch for samba4rc5 with options to manage UPN
Patch for samba4rc5, the changes are:
A new option in samba-tool domain classicupgrade (--add-upn)
A new subcommand in samba-tool user (setupn)
A new option in samba-tool user create (--upn=UPN)