Bug 7736 - request: allow net user to set userPrincipalName
Summary: request: allow net user to set userPrincipalName
Status: REOPENED
Alias: None
Product: Samba 4.0
Classification: Unclassified
Component: AD: LDB/DSDB/SAMDB (show other bugs)
Version: unspecified
Hardware: All Linux
: P3 enhancement (vote)
Target Milestone: ---
Assignee: Andrew Bartlett
QA Contact: samba4-qa@samba.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-16 08:58 UTC by Trever Adams
Modified: 2020-11-11 20:16 UTC (History)
3 users (show)

See Also:


Attachments
Patch for samba4rc5 with options to manage UPN (13.76 KB, patch)
2012-11-14 13:26 UTC, Alejandro Escanero Blanco
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Trever Adams 2010-10-16 08:58:53 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.

Thank you.
Comment 1 Matthias Dieter Wallnöfer 2010-10-16 09:27:55 UTC
Lukasz,

you did some work on the "net" tool. Do you have interest on implementing this?
Comment 2 Lukasz Zalewski 2010-10-16 12:09:28 UTC
Matthias,
But of course :). Expect a patch soon  
Comment 3 Matthias Dieter Wallnöfer 2010-10-19 04:43:11 UTC
Patch should soon go into "master".
Comment 4 Trever Adams 2011-04-14 18:38:05 UTC
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?
Comment 5 Matthias Dieter Wallnöfer 2011-04-16 09:18:22 UTC
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.
Comment 6 Trever Adams 2011-04-16 10:18:44 UTC
administrator and Guest at least. Sorry that I forgot this in my initial rerequest.
Comment 7 Matthias Dieter Wallnöfer 2011-04-16 10:53:31 UTC
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?
Comment 8 Trever Adams 2011-04-16 12:03:36 UTC
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.
Comment 9 Alejandro Escanero Blanco 2012-11-14 13:26:37 UTC
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)
Comment 10 Douglas Bagnall 2020-11-11 20:16:09 UTC
Unsurprisingly the patch no longer applies, even accounting for removing 'source4/scripting/' from the file names.