AD plugin or utility that generates unique uidnumber / gidnumber on creation The 2019 Stack Overflow Developer Survey Results Are InHow to automate RFC2307 attributes in Active Directory?WipeDrive Utility?Vista's Unique Keyboard ShortcutsWhat's the reverse DNS command line utility?Debian Linux: Find Application that generates lots of Incoming TrafficWindows AD, bulk user creation, homedrv creation via commandlineuser SID unique?Using udev to create a character device based on a driver being loadedLDAP User Management Tool for Mac 10.7.1File creation time on Windows vs LinuxWindows utility list compatible devices with linux
What does "fetching by region is not available for SAM files" means?
Is a "Democratic" Oligarchy-Style System Possible?
The difference between dialogue marks
Why do UK politicians seemingly ignore opinion polls on Brexit?
What is the motivation for a law requiring 2 parties to consent for recording a conversation
Aging parents with no investments
What does ひと匙 mean in this manga and has it been used colloquially?
If a Druid sees an animal’s corpse, can they wild shape into that animal?
Earliest use of the term "Galois extension"?
How to type this arrow in math mode?
Protecting Dualbooting Windows from dangerous code (like rm -rf)
How to deal with fear of taking dependencies
How to answer pointed "are you quitting" questioning when I don't want them to suspect
Loose spokes after only a few rides
Can one be advised by a professor who is very far away?
How to notate time signature switching consistently every measure
Did 3000BC Egyptians use meteoric iron weapons?
Can someone be penalized for an "unlawful" act if no penalty is specified?
Identify This Plant (Flower)
Is flight data recorder erased after every flight?
Are children permitted to help build the Beis Hamikdash?
Why didn't the Event Horizon Telescope team mention Sagittarius A*?
How to obtain Confidence Intervals for a LASSO regression?
Why isn't airport relocation done gradually?
AD plugin or utility that generates unique uidnumber / gidnumber on creation
The 2019 Stack Overflow Developer Survey Results Are InHow to automate RFC2307 attributes in Active Directory?WipeDrive Utility?Vista's Unique Keyboard ShortcutsWhat's the reverse DNS command line utility?Debian Linux: Find Application that generates lots of Incoming TrafficWindows AD, bulk user creation, homedrv creation via commandlineuser SID unique?Using udev to create a character device based on a driver being loadedLDAP User Management Tool for Mac 10.7.1File creation time on Windows vs LinuxWindows utility list compatible devices with linux
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
I'm looking for either:
A plugin that will auto-generate a unique uidNumber attribute value for new users and a unique gidNumber attribute value for new groups upon creation.
A configurable user/group management application that can generate the unique values above as well as populate the various other attributes required for Linux integration
We present are using a home-grown script and web page to do all this, but we're looking for something that we don't have to maintain and a little more polished.
Anyone know of a good tool that fits the bill?
Thanks!
linux windows attributes
add a comment |
I'm looking for either:
A plugin that will auto-generate a unique uidNumber attribute value for new users and a unique gidNumber attribute value for new groups upon creation.
A configurable user/group management application that can generate the unique values above as well as populate the various other attributes required for Linux integration
We present are using a home-grown script and web page to do all this, but we're looking for something that we don't have to maintain and a little more polished.
Anyone know of a good tool that fits the bill?
Thanks!
linux windows attributes
You might want to base generation on objectguid, which is unique forest wide and can be generated on the fly.
– Jim B
May 17 '16 at 0:16
add a comment |
I'm looking for either:
A plugin that will auto-generate a unique uidNumber attribute value for new users and a unique gidNumber attribute value for new groups upon creation.
A configurable user/group management application that can generate the unique values above as well as populate the various other attributes required for Linux integration
We present are using a home-grown script and web page to do all this, but we're looking for something that we don't have to maintain and a little more polished.
Anyone know of a good tool that fits the bill?
Thanks!
linux windows attributes
I'm looking for either:
A plugin that will auto-generate a unique uidNumber attribute value for new users and a unique gidNumber attribute value for new groups upon creation.
A configurable user/group management application that can generate the unique values above as well as populate the various other attributes required for Linux integration
We present are using a home-grown script and web page to do all this, but we're looking for something that we don't have to maintain and a little more polished.
Anyone know of a good tool that fits the bill?
Thanks!
linux windows attributes
linux windows attributes
asked Mar 5 '13 at 16:17
jasonpvpjasonpvp
3112
3112
You might want to base generation on objectguid, which is unique forest wide and can be generated on the fly.
– Jim B
May 17 '16 at 0:16
add a comment |
You might want to base generation on objectguid, which is unique forest wide and can be generated on the fly.
– Jim B
May 17 '16 at 0:16
You might want to base generation on objectguid, which is unique forest wide and can be generated on the fly.
– Jim B
May 17 '16 at 0:16
You might want to base generation on objectguid, which is unique forest wide and can be generated on the fly.
– Jim B
May 17 '16 at 0:16
add a comment |
2 Answers
2
active
oldest
votes
I don't know of any existing tools that actually trigger on creation. Though like Nic mentioned, it is hypothetically possible to write something that could do that.
But realistically, how often are users/groups getting created outside of already automated processes? If they're not already, your existing provisioning processes should be augmented to add the relevant RFC2307 attributes also described in this TechNet blog post. For the stragglers that are created manually, you can have a script run at whatever interval you like that looks for objects missing the attributes and populating them as necessary.
In our environment, the script we have runs every 5 min on the DC holding the PDC Emulator role. But we could probably drop it down to once a minute without much additional impact. We also generate our UID/GID values from an algorithm that's based on the object's SID rather than a simple auto-incrementing value. It has the benefit that they're guaranteed* unique between domains/forests and we don't need to do any lookups to find the next value or make sure the value we want to use isn't already in use. I can post that function if you'd like. But it sounds like you guys may already have your own system for that.
*Guaranteed = as much as you can guarantee that two domains won't be created with the same randomly generated domain ID.
Edit: By request, here's the Powershell function we use to generate UIDs/GIDs from a SID.
function Get-UidFromSid()
Get-UidFromSid
Calculate a UID from an existing Active Directory user via pipeline input.
#>
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
add a comment |
You could assign the gidNumber attribute from a PowerShell script. To make it automatic, call the script as a scheduled task. I wrote a cmdlet called Initialize-GroupGids which assigns unique gids to AD groups, and can be customized for different environments with parameters.
But basically, you can just to do something like this in PowerShell.
# Find the highest GID used on any group in the domain
$highGid = Get-ADGroup -LDAPFilter "(gidNumber=*)" -Properties gidNumber |
Measure-Object -Property gidNumber -Maximum |
Select-Object -ExpandProperty Maximum
# Avoid assigning GIDs below 1000
$highGid = [Math]::max( $highGid, 1000 )
# Find every security group without a gidNumber, and give it one.
Get-ADGroup -LDAPFilter "(!gidNumber=*)" |
? $_.GroupCategory -eq "Security" |
$groups | Set-ADGroup -Add @ gidNumber=++$highGid
This could easily be adopted to work with users and uidNumbers too.
If you want the assignment of uids/gids to be instantaneous, Microsoft has an interesting technote about listening to change notifications from Active Directory via LDAP. I think that's a bit too sophisticated for PowerShell though.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f484908%2fad-plugin-or-utility-that-generates-unique-uidnumber-gidnumber-on-creation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
I don't know of any existing tools that actually trigger on creation. Though like Nic mentioned, it is hypothetically possible to write something that could do that.
But realistically, how often are users/groups getting created outside of already automated processes? If they're not already, your existing provisioning processes should be augmented to add the relevant RFC2307 attributes also described in this TechNet blog post. For the stragglers that are created manually, you can have a script run at whatever interval you like that looks for objects missing the attributes and populating them as necessary.
In our environment, the script we have runs every 5 min on the DC holding the PDC Emulator role. But we could probably drop it down to once a minute without much additional impact. We also generate our UID/GID values from an algorithm that's based on the object's SID rather than a simple auto-incrementing value. It has the benefit that they're guaranteed* unique between domains/forests and we don't need to do any lookups to find the next value or make sure the value we want to use isn't already in use. I can post that function if you'd like. But it sounds like you guys may already have your own system for that.
*Guaranteed = as much as you can guarantee that two domains won't be created with the same randomly generated domain ID.
Edit: By request, here's the Powershell function we use to generate UIDs/GIDs from a SID.
function Get-UidFromSid()
Get-UidFromSid
Calculate a UID from an existing Active Directory user via pipeline input.
#>
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
add a comment |
I don't know of any existing tools that actually trigger on creation. Though like Nic mentioned, it is hypothetically possible to write something that could do that.
But realistically, how often are users/groups getting created outside of already automated processes? If they're not already, your existing provisioning processes should be augmented to add the relevant RFC2307 attributes also described in this TechNet blog post. For the stragglers that are created manually, you can have a script run at whatever interval you like that looks for objects missing the attributes and populating them as necessary.
In our environment, the script we have runs every 5 min on the DC holding the PDC Emulator role. But we could probably drop it down to once a minute without much additional impact. We also generate our UID/GID values from an algorithm that's based on the object's SID rather than a simple auto-incrementing value. It has the benefit that they're guaranteed* unique between domains/forests and we don't need to do any lookups to find the next value or make sure the value we want to use isn't already in use. I can post that function if you'd like. But it sounds like you guys may already have your own system for that.
*Guaranteed = as much as you can guarantee that two domains won't be created with the same randomly generated domain ID.
Edit: By request, here's the Powershell function we use to generate UIDs/GIDs from a SID.
function Get-UidFromSid()
Get-UidFromSid
Calculate a UID from an existing Active Directory user via pipeline input.
#>
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
add a comment |
I don't know of any existing tools that actually trigger on creation. Though like Nic mentioned, it is hypothetically possible to write something that could do that.
But realistically, how often are users/groups getting created outside of already automated processes? If they're not already, your existing provisioning processes should be augmented to add the relevant RFC2307 attributes also described in this TechNet blog post. For the stragglers that are created manually, you can have a script run at whatever interval you like that looks for objects missing the attributes and populating them as necessary.
In our environment, the script we have runs every 5 min on the DC holding the PDC Emulator role. But we could probably drop it down to once a minute without much additional impact. We also generate our UID/GID values from an algorithm that's based on the object's SID rather than a simple auto-incrementing value. It has the benefit that they're guaranteed* unique between domains/forests and we don't need to do any lookups to find the next value or make sure the value we want to use isn't already in use. I can post that function if you'd like. But it sounds like you guys may already have your own system for that.
*Guaranteed = as much as you can guarantee that two domains won't be created with the same randomly generated domain ID.
Edit: By request, here's the Powershell function we use to generate UIDs/GIDs from a SID.
function Get-UidFromSid()
Get-UidFromSid
Calculate a UID from an existing Active Directory user via pipeline input.
#>
I don't know of any existing tools that actually trigger on creation. Though like Nic mentioned, it is hypothetically possible to write something that could do that.
But realistically, how often are users/groups getting created outside of already automated processes? If they're not already, your existing provisioning processes should be augmented to add the relevant RFC2307 attributes also described in this TechNet blog post. For the stragglers that are created manually, you can have a script run at whatever interval you like that looks for objects missing the attributes and populating them as necessary.
In our environment, the script we have runs every 5 min on the DC holding the PDC Emulator role. But we could probably drop it down to once a minute without much additional impact. We also generate our UID/GID values from an algorithm that's based on the object's SID rather than a simple auto-incrementing value. It has the benefit that they're guaranteed* unique between domains/forests and we don't need to do any lookups to find the next value or make sure the value we want to use isn't already in use. I can post that function if you'd like. But it sounds like you guys may already have your own system for that.
*Guaranteed = as much as you can guarantee that two domains won't be created with the same randomly generated domain ID.
Edit: By request, here's the Powershell function we use to generate UIDs/GIDs from a SID.
function Get-UidFromSid()
Get-UidFromSid
Calculate a UID from an existing Active Directory user via pipeline input.
#>
edited 13 hours ago
Jonathon Reinhart
1581115
1581115
answered Jan 12 '16 at 7:05
Ryan BolgerRyan Bolger
14.1k23051
14.1k23051
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
add a comment |
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Objectguid is guaranteed to be unique within the forest and generated on object creation
– Jim B
Jun 19 '16 at 15:29
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Ryan, I'd be interested to see the function you mentioned, if that's something you're still able to provide - I believe it would add value to the original answer as an edit too.
– JimNim
Jul 19 '17 at 15:55
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
Done. I also have C#, Bash, and Python versions as well.
– Ryan Bolger
Jul 23 '17 at 0:00
add a comment |
You could assign the gidNumber attribute from a PowerShell script. To make it automatic, call the script as a scheduled task. I wrote a cmdlet called Initialize-GroupGids which assigns unique gids to AD groups, and can be customized for different environments with parameters.
But basically, you can just to do something like this in PowerShell.
# Find the highest GID used on any group in the domain
$highGid = Get-ADGroup -LDAPFilter "(gidNumber=*)" -Properties gidNumber |
Measure-Object -Property gidNumber -Maximum |
Select-Object -ExpandProperty Maximum
# Avoid assigning GIDs below 1000
$highGid = [Math]::max( $highGid, 1000 )
# Find every security group without a gidNumber, and give it one.
Get-ADGroup -LDAPFilter "(!gidNumber=*)" |
? $_.GroupCategory -eq "Security" |
$groups | Set-ADGroup -Add @ gidNumber=++$highGid
This could easily be adopted to work with users and uidNumbers too.
If you want the assignment of uids/gids to be instantaneous, Microsoft has an interesting technote about listening to change notifications from Active Directory via LDAP. I think that's a bit too sophisticated for PowerShell though.
add a comment |
You could assign the gidNumber attribute from a PowerShell script. To make it automatic, call the script as a scheduled task. I wrote a cmdlet called Initialize-GroupGids which assigns unique gids to AD groups, and can be customized for different environments with parameters.
But basically, you can just to do something like this in PowerShell.
# Find the highest GID used on any group in the domain
$highGid = Get-ADGroup -LDAPFilter "(gidNumber=*)" -Properties gidNumber |
Measure-Object -Property gidNumber -Maximum |
Select-Object -ExpandProperty Maximum
# Avoid assigning GIDs below 1000
$highGid = [Math]::max( $highGid, 1000 )
# Find every security group without a gidNumber, and give it one.
Get-ADGroup -LDAPFilter "(!gidNumber=*)" |
? $_.GroupCategory -eq "Security" |
$groups | Set-ADGroup -Add @ gidNumber=++$highGid
This could easily be adopted to work with users and uidNumbers too.
If you want the assignment of uids/gids to be instantaneous, Microsoft has an interesting technote about listening to change notifications from Active Directory via LDAP. I think that's a bit too sophisticated for PowerShell though.
add a comment |
You could assign the gidNumber attribute from a PowerShell script. To make it automatic, call the script as a scheduled task. I wrote a cmdlet called Initialize-GroupGids which assigns unique gids to AD groups, and can be customized for different environments with parameters.
But basically, you can just to do something like this in PowerShell.
# Find the highest GID used on any group in the domain
$highGid = Get-ADGroup -LDAPFilter "(gidNumber=*)" -Properties gidNumber |
Measure-Object -Property gidNumber -Maximum |
Select-Object -ExpandProperty Maximum
# Avoid assigning GIDs below 1000
$highGid = [Math]::max( $highGid, 1000 )
# Find every security group without a gidNumber, and give it one.
Get-ADGroup -LDAPFilter "(!gidNumber=*)" |
? $_.GroupCategory -eq "Security" |
$groups | Set-ADGroup -Add @ gidNumber=++$highGid
This could easily be adopted to work with users and uidNumbers too.
If you want the assignment of uids/gids to be instantaneous, Microsoft has an interesting technote about listening to change notifications from Active Directory via LDAP. I think that's a bit too sophisticated for PowerShell though.
You could assign the gidNumber attribute from a PowerShell script. To make it automatic, call the script as a scheduled task. I wrote a cmdlet called Initialize-GroupGids which assigns unique gids to AD groups, and can be customized for different environments with parameters.
But basically, you can just to do something like this in PowerShell.
# Find the highest GID used on any group in the domain
$highGid = Get-ADGroup -LDAPFilter "(gidNumber=*)" -Properties gidNumber |
Measure-Object -Property gidNumber -Maximum |
Select-Object -ExpandProperty Maximum
# Avoid assigning GIDs below 1000
$highGid = [Math]::max( $highGid, 1000 )
# Find every security group without a gidNumber, and give it one.
Get-ADGroup -LDAPFilter "(!gidNumber=*)" |
? $_.GroupCategory -eq "Security" |
$groups | Set-ADGroup -Add @ gidNumber=++$highGid
This could easily be adopted to work with users and uidNumbers too.
If you want the assignment of uids/gids to be instantaneous, Microsoft has an interesting technote about listening to change notifications from Active Directory via LDAP. I think that's a bit too sophisticated for PowerShell though.
answered Apr 13 '13 at 19:52
NicNic
8,862144691
8,862144691
add a comment |
add a comment |
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f484908%2fad-plugin-or-utility-that-generates-unique-uidnumber-gidnumber-on-creation%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You might want to base generation on objectguid, which is unique forest wide and can be generated on the fly.
– Jim B
May 17 '16 at 0:16