Script to find out that users do not have inheritable permission checked
Hi all,
I just check our AD (windows 2003 R2) and some users have "allow inheritable permissions from the parent to propagate to this object and all child objects. include these with entries expilitly defined here" checked if I open active directory
users and computers console and highlight this user and go to properties and select security and click advanced). some users do not have ""allow inheritable permissions from the parent to propagate to this object and all child objects. " checked.
Is there a way to script to find out which users do not have "allow inheritable permissions from the parent to propagate to this object and all child objects. .." checked?
Thank you for your help.
There are several ways to use ADO in a VBScript program. The alternative below uses an ADO command object, so we can specify a "Page Size". This overcomes the 1000 (or 1500) limit on records returned, as it turns on paging. I have also modified
the script for comma delimited output. This script should be run at a command prompt so the output can be redirected to a text file. For example:
cscript //nologo FindUsers.vbs > report.csv
The modified script follows:
Option Explicit
Dim adoCommand, adoConnection, strBase, strFilter, strAttributes
Dim objRootDSE, strDNSDomain, strQuery, adoRecordset, strNTName, strDN
Dim objUser, objSecurityDescriptor, intNTSecDescCntrl, strInheritable
Const SE_DACL_PROTECTED = &H1000
' Setup ADO objects.
Set adoCommand = CreateObject("ADODB.Command")
Set adoConnection = CreateObject("ADODB.Connection")
adoConnection.Provider = "ADsDSOObject"
adoConnection.Open "Active Directory Provider"
Set adoCommand.ActiveConnection = adoConnection
' Search entire Active Directory domain.
Set objRootDSE = GetObject("LDAP://RootDSE")
strDNSDomain = objRootDSE.Get("defaultNamingContext")
strBase = "<LDAP://" & strDNSDomain & ">"
' Filter on user objects.
strFilter = "(&(objectCategory=person)(objectClass=user))"
' Comma delimited list of attribute values to retrieve.
strAttributes = "distinguishedName,sAMAccountName"
' Construct the LDAP syntax query.
strQuery = strBase & ";" & strFilter & ";" & strAttributes & ";subtree"
adoCommand.CommandText = strQuery
adoCommand.Properties("Page Size") = 500
adoCommand.Properties("Timeout") = 30
adoCommand.Properties("Cache Results") = False
' Run the query.
Set adoRecordset = adoCommand.Execute
' Enumerate the resulting recordset.
' Write a header line.
Wscript.Echo """NT Name"",""Distinguished Name"",""Allow inheritable permissions"""
Do Until adoRecordset.EOF
' Retrieve values.
strNTName = adoRecordset.Fields("sAMAccountName").Value
strDN = adoRecordset.Fields("distinguishedName").Value
strDN = Replace(strDN, "/", "\/")
Set objUser = GetObject("LDAP://" & strDN)
Set objSecurityDescriptor = objUser.Get("ntSecurityDescriptor")
intNtSecDescCntrl = objSecurityDescriptor.Control
If (intNtSecDescCntrl And SE_DACL_PROTECTED) <> 0 Then
strInheritable = "Disabled"
Else
strInheritable = "Enabled"
End If
Wscript.Echo """" & strNTName & """,""" & strDN & """," & strInheritable
' Move to the next record in the recordset.
adoRecordset.MoveNext
Loop
' Clean up.
adoRecordset.Close
adoConnection.Close
Richard Mueller
MVP ADSI
Similar Messages
-
What do I do now that I have down loaded LR4 only to find out that it's not compatable with windows XP?
Upgrade your operating system? Call sales support to return the package/ undo the purchase within the 14 day timeframe? Whichever you prefer...
Mylenium -
Installed firefox 4 for os 10.4.11 and replaced 3.6 to find out that it's not compatible. Need to reinstall 3.6, but cannot find it. Please provide where I can re-instal Firefox 3.6.
Firefox 4 requires at least OS X 10.5 and an Intel Mac.
* http://www.mozilla.com/firefox/4.0/system-requirements/
For Mac OS X 10.4.11 or Mac OS X 10.5.8 you can look at:
* http://www.floodgap.com/software/tenfourfox/
Firefox 3.6.x can be found here:
* http://www.mozilla.com/en-US/firefox/all-older.html -
User does not have sufficient permission(failed to execute submit operation)
Users are facing this error in my environment.Please tel why this error creeps up and how do i resolve it?
Please find error code below:-
Date:
Application:
Application
Version: 7.5.1561.116
Severity:
Error
Message:
Microsoft.EnterpriseManagement.Common.UnauthorizedAccessEnterpriseManagementException:
The user domain-name\user does not have sufficient permission to perform the
operation.
at
Microsoft.EnterpriseManagement.Common.Internal.ServiceProxy.HandleFault(String
methodName, Message message)
at
Microsoft.EnterpriseManagement.Common.Internal.ConnectorFrameworkConfigurationServiceProxy.ProcessDiscoveryData(Guid
discoverySourceId, IList`1 entityInstances, IDictionary`2 streams,
ObjectChangelist`1 extensions)
at
Microsoft.EnterpriseManagement.ConnectorFramework.IncrementalDiscoveryData.CommitInternal(EnterpriseManagementGroup
managementGroup, Guid discoverySourceId, Boolean
useOptimisticConcurrency)
at
Microsoft.EnterpriseManagement.ConnectorFramework.IncrementalDiscoveryData.Commit(EnterpriseManagementGroup
managementGroup)
at
Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.EnterpriseManagementObjectProjectionWriteAdapter.WriteSdkObject(EnterpriseManagementGroup
managementGroup, IList`1 sdkObjects, IDictionary`2 parameters)
at
Microsoft.EnterpriseManagement.UI.SdkDataAccess.DataAdapters.SdkWriteAdapter`1.DoAction(DataQueryBase
query, IList`1 dataSources, IDictionary`2 parameters, IList`1 inputs, String
outputCollectionName)
at
Microsoft.EnterpriseManagement.UI.ViewFramework.SingleItemSupportAdapter.DoAction(DataQueryBase
query, IList`1 dataSources, IDictionary`2 parameters, IList`1 inputs, String
outputCollectionName)
at
Microsoft.EnterpriseManagement.UI.DataModel.QueryQueue.StartExecuteQuery(Object
sender, ConsoleJobEventArgs e)
at
Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent
component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)Hi,
Adding more questions...
Is the user submitting a form?
Which form?
Which scsm roles are the user member of?
Any data model customizations related to the process?
I've seen something like this before at one of my clients where a custom relationship was used. The problem only arose when the user tried to relate an incident to another object
using the custom relationship. Normally this shouldn’t be a problem but in their case it was.
Patrik Sundqvist Solutions Architect @ Gridpro AB Blog: http://blogs.litware.se -
How do I use my iCloud???
I purchased 4 movies and 2 audio books from iTunes only to find out my iPad2 didn't have enough storage, so I purchased more storage from iCloud.
My iTunes account only shows the 4 movies that need to still be downloaded (not the two books) After purchasing 20GB from iCloud I am still receiving the "There is not enough available storage. You can manage your storage in Settings" message. I have gone to my Settings, where it shows I have the new, extra storage. I have set all the iCloud settings as shown on the Apple website. In my iCloud settings, it shows I have 17GB available out of 25GB. In my General settings, it shows that I have a capacity of 28.6 GB, while my Available is 2.9GB. (????)
I don't know why I still can't download the movies. I wouldn't know where to go (how to get to) the iCloud if I could...
Also, iTunes has sent me receipts for the movies and audio books I purchased as well. Where are they???
Thank you SO very much for any assistance you can offer me!Cancel your storage upgrade
If you upgrade or renew your storage but no longer need it, you can cancel. If you cancel your storage plan within 15 days of an upgrade or within 45 days after a yearly payment, you can contact Apple for a full refund. After this period, you can downgrade your storage for the following year.
Note: Partial refunds are available where required by law.
From here > http://help.apple.com/icloud/?lang=en#mma3518f8580
HelpKimIsAlreadyTaken wrote:
Since I purchased about $70 worth of movies and books and they won't load onto my iPad, do you think iTunes will refund my money?
If you make more room on your Device perhaps you can View/ use the purchases...
However if you would prefer a Refund... you can always ask... be sure to explain your situation...
To Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact
Note:
It is stated that all sales are final -
Hi,
Can you please on the above issue? I have one script which works fine for sp2010 but not sp2013 below,
Script
function Check_User_In_ActiveDirectory([string]$LoginName, [string]$domaincnx)
$returnValue = $false
#Filter on User which exists and activated
#$strFilter = "(&(objectCategory=user)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=2)(samAccountName=$LoginName))"
#Filter on User which only exists
#$strFilter = "(&(objectCategory=user)(objectClass=user)(samAccountName=$LoginName))"
#Filter on User and NTgroups which only exists
$strFilter = "(&(|(objectCategory=user)(objectCategory=group))(samAccountName=$LoginName))"
$objDomain = New-Object System.DirectoryServices.DirectoryEntry($domaincnx)
$objSearcher = New-Object System.DirectoryServices.DirectorySearcher
$objSearcher.SearchRoot = $objDomain
$objSearcher.PageSize = 1000
$objSearcher.Filter = $strFilter
$objSearcher.SearchScope = "Subtree"
#$objSearcher.PropertiesToLoad.Add("name")
$colResults = $objSearcher.FindAll()
if($colResults.Count -gt 0)
#Write-Host "Account exists and Active: ", $LoginName
$returnValue = $true
return $returnValue
function ListOrphanedUsers([string]$SiteCollectionURL, [string]$mydomaincnx)
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
$site = new-object Microsoft.SharePoint.SPSite($SiteCollectionURL)
$web = $site.openweb()
#Debugging - show SiteCollectionURL
write-host "SiteCollectionURL: ", $SiteCollectionURL
Write-Output "SiteCollectionURL - $SiteCollectionURL"
$siteCollUsers = $web.SiteUsers
write-host "Users Items: ", $siteCollUsers.Count
foreach($MyUser in $siteCollUsers)
if(($MyUser.LoginName.ToLower() -ne "sharepoint\system") -and ($MyUser.LoginName.ToLower() -ne "nt authority\authenticated users") -and ($MyUser.LoginName.ToLower() -ne "nt authority\local service"))
#Write-Host " USER: ", $MyUser.LoginName
$UserName = $MyUser.LoginName.ToLower()
$Tablename = $UserName.split("\")
Write-Host "User Login: ", $MyUser.LoginName
$returncheck = Check_User_In_ActiveDirectory $Tablename[1] $mydomaincnx
if($returncheck -eq $False)
#Write-Host "User not exist: ", $MyUser.LoginName, "on domain", $mydomaincnx
Write-Output $MyUser.LoginName
$web.Dispose()
$site.Dispose()
function ListOrphanedUsersForAllColl([string]$WebAppURL, [string]$DomainCNX)
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null
$Thesite = new-object Microsoft.SharePoint.SPSite($WebAppURL)
$oApp = $Thesite.WebApplication
write-host "Total of Site Collections: ", $oApp.Sites.Count
$i = 0
foreach ($Sites in $oApp.Sites)
$i = $i + 1
write-host "Collection N° ", $i, "on ", $oApp.Sites.Count
if($i -gt 0)
$mySubweb = $Sites.RootWeb
$TempRelativeURL = $mySubweb.Url
ListOrphanedUsers $TempRelativeURL $DomainCNX
function StartProcess()
# Create the stopwatch
[System.Diagnostics.Stopwatch] $sw;
$sw = New-Object System.Diagnostics.StopWatch
$sw.Start()
#cls
ListOrphanedUsersForAllColl "http://portal" "LDAP://DC=Srabon,DC=com"
ListOrphanedUsersForAllColl "http://portal/sites/Test" "LDAP://DC=Srabon,DC=com"
$sw.Stop()
# Write the compact output to the screen
write-host "Time: ", $sw.Elapsed.ToString()
StartProcess
# Can be executed with that command : "Check-SharePoint-Orphaned-Users.ps1 > orphaned_users.txt"
srabonHi Srabon,
Try this it works in SP2007, SP2010, and SP2013.
Mod line 70: $WebAppURL="http://intranet.contoso.com" to your "http://WebApp"
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
#Functions to Imitate SharePoint 2007, 2010, 2013
function global:Get-SPWebApplication($WebAppURL)
return [Microsoft.SharePoint.Administration.SPWebApplication]::Lookup($WebAppURL)
function global:Get-SPSite($url)
return new-Object Microsoft.SharePoint.SPSite($url)
function global:Get-SPWeb($url)
$site= New-Object Microsoft.SharePoint.SPSite($url)
if ($site -ne $null)
$web=$site.OpenWeb();
return $web
#Check if User exists in ActiveDirectory
function CheckUserExistsInAD()
Param( [Parameter(Mandatory=$true)] [string]$UserLoginID )
#Search the User in ActiveDirectory
$forest = [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()
foreach ($Domain in $forest.Domains)
$context = new-object System.DirectoryServices.ActiveDirectory.DirectoryContext("Domain", $Domain.Name)
$domain = [System.DirectoryServices.ActiveDirectory.Domain]::GetDomain($context)
$root = $domain.GetDirectoryEntry()
$search = [System.DirectoryServices.DirectorySearcher]$root
$search.Filter = "(&(objectCategory=User)(samAccountName=$UserLoginID))"
$result = $search.FindOne()
if ($result -ne $null)
return $true
return $false
$WebAppURL="http://intranet.contoso.com"
#Get all Site Collections of the web application
$WebApp = Get-SPWebApplication $WebAppURL
#Iterate through all Site Collections
foreach($site in $WebApp.Sites)
#Get all Webs with Unique Permissions - Which includes Root Webs
$WebsColl = $site.AllWebs | Where {$_.HasUniqueRoleAssignments -eq $True} | ForEach-Object {
$OrphanedUsers = @()
#Iterate through the users collection
foreach($User in $_.SiteUsers)
#Exclude Built-in User Accounts , Security Groups & an external domain "corporate"
if (($User.LoginName.ToLower() -ne "nt authority\authenticated users") -and
($User.LoginName.ToLower() -ne "sharepoint\system") -and
($User.LoginName.ToLower() -ne "nt authority\local service") -and
($user.IsDomainGroup -eq $false ) -and
($User.LoginName.ToLower().StartsWith("corporate") -ne $true) )
$UserName = $User.LoginName.split("\") #Domain\UserName
$AccountName = $UserName[1] #UserName
if ( ( CheckUserExistsInAD $AccountName) -eq $false )
Write-Host "$($User.Name)($($User.LoginName)) from $($_.URL) doesn't Exists in AD!"
#Display Orphaned users
$OrphanedUsers+=$User.LoginName
# <<<UNCOMMENT to Remove Users#
# Remove the Orphaned Users from the site
# foreach($OrpUser in $OrphanedUsers)
# $_.SiteUsers.Remove($OrpUser)
# Write-host "Removed the Orphaned user $($OrpUser) from $($_.URL) "
$web.Dispose()
$site.Dispose()
-Ivan -
black macbook - 2 ghz intel core 2 duo, 2gb (667 mhz) sdram
Model Name:
MacBook
Model Identifier:
MacBook2,1
Processor Name:
Intel Core 2 Duo
Processor Speed:
2 GHz
Number of Processors:
1
Total Number of Cores:
2
L2 Cache:
4 MB
Memory:
2 GB
Bus Speed:
667 MHz
Boot ROM Version:
MB21.00A5.B07
SMC Version (system):
1.13f3
Serial Number (system):
4H*****WGM
Hardware UUID:
Sudden Motion Sensor:
State:
Enabled
<Edited by Host>It is not that you are not worthy rather it is your Macbook2,1 that is incapable of handling Mavericks. The latest OS that your Macbook will support is Lion (OS X 10.7.x). The oldest Macbook that can handle Mavericks is Macbook5,1 (Aluminum Late 2008). Apple has for many years maintained a 7 year support window before a computer is declared obsolete and no longer supported. This is the seventh year in the Macbook2,1 lifecycle.
-
I have seen this question already posed in the forums about updating the latest version of Firefox, however I am not trying to update the version, I am trying to download the latest version of Firefox to Windows through Chrome.
I click the download button on the Mozilla website and I extract the file. At this point the computer asks me if I want to save the file or run the file. I have tried to just run the file and the computer shoots out this message "You may not have the necessary permissions to use all the features of the program you are about to run. You may run this program as a different user or continue to run the program as the currant user". The window gives me two options, "Run as currant user" (which closes everything when I choose it), and "Run as administrator" (which leaves me with a user name and password which are always wrong).
I can't download Firefox and have tried alot of stuff. I feel like it is a security setting in my computer that needs to be adjusted but I don't know enough to start randomly tinkering around.
As in all Forums... PLEASE HELP!!!!!!!!When I got to the screen that was giving me problems I typed in all the passwords that I knew in my head, I even tried entering with no password. I do not normally have a password for my account. However, I did put a password on my account and logged back in and tried again with the password I had just created and it still didn't work.
-
i tried to install the newest version of firefox but i couldn't. when i drag the firefox item to the application folder it asks me if i want to replace the previous version, and i click on REPLACE. After doing that i says that operation cannot be completed because i do not have some permissions to do that.
* Download a new copy of the Firefox program
* Firefox 4.0: http://www.mozilla.com/en-US/firefox/all.html
* Firefox 3.6: http://www.mozilla.com/en-US/firefox/all-older.html
* Trash the current Firefox application to do a clean (re-)install
* Install the new version that you have downloaded
Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data. -
same as title
please help me, consider that there is plenty of users are having same problem, my ipad2 is not a problem.If the iPads are Counterfeit then Apple will have nothing to do with them except maybe try to find the Counterfeiters and charge them.
It's the usual story... If something is too good or cheap to be true it probably is. -
How to find out that user starts editing data ?
Hi all,
I need to do something like changing icon to indicate editing session when the user starts editing cell in JTable, what event should I listen to ?
Thanks in advance
SetyaHi,
add a PropertyChangeListener to your JTable and listen to the property "tableCellEditor". When it its null, editing is stopped, if it is non-null, editing was started.
Thus you can determine when an editing session was initiated.
Michael -
Please can i have some help. As my ipod doesnt have enough space to finish dowloading a film and i have deleted all my apps and there is still no space.
I would like to delete the download. Thanks in advance.According to the trms of the iTunes and app stores - all sales are final. but that doe not mean that you can't try anyway. People ask for refunds all the time. Use the Express Lane email to contact iTunes.
http://www.apple.com/support/itunes/contact/
You can still download the other movies in iTunes on your computer. Launch iTunes and go to Store>Check for Available Downloads. You can download them in iTunes and then sync them to the iPad later. When you are done watching the first movie, you can transfer it into iTunes on your computer, delete it from the iPad and you will have the room for another movie on the device. To transfer the movie when you are done with it, you can use the transfer purchases feature.
Transfer purchases.
http://support.apple.com/kb/HT1848
If the photos that you lost were photos that you took with the iPad, they should be in your iPad backup - if you sync with iTunes or if you backup with iCloud.
How to backup and about iOS backups
http://support.apple.com/kb/HT1766
http://support.apple.com/kb/HT4946 -
I was online when a mcaffee alert came up saying that real time scanning was turned off. After prompting it to turn back on it did but only for a short time. Shortly after that Firefox shut down. Now when clicking on the shortcut and the firefox emblem in the start menu the aforementioned error message comes up. Now certain programs are firewalled.
Any suggestions please?
-
I am the ONLY person with administration privileges. I contacted Apple and they said to contact firefox. Because I cannot update it, it keeps closing every time I try to print something.
Help please!* Download a new copy of the Firefox program: http://www.mozilla.com/firefox/all.html
* Trash the current Firefox application to do a clean (re)install.
* Install the new version that you have downloaded.
Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data. -
Finding out Concurrent Users to Apache
Hi there.
I'm in the middle of doing a sizing or a Ias, and I was trying to find out how many concurrent/total users are using a server, by analizing a nice 800 mb access_log.
The thing is that I was able to find out how many users access a parcitular page (for portal, for instance, I check the entry point at /pls/portal30) and that gives me a rough idea of how many people access that page. The problem is...how can I find out CONCURRENT users? I was thinking of checking for a particular page/different users within a time window, but I'm finding it quite hard to find a tool to automate that.
Thanks in advance.For multiple screen :
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gs = ge.getScreenDevices();
// Get size of each screen
for (int i=0; i<gs.length; i++) {
DisplayMode dm = gs.getDisplayMode();
int screenWidth = dm.getWidth();
int screenHeight = dm.getHeight();
Maybe you are looking for
-
Replace the hard drive in my iPod Mini with CompactFlash Card?
Hi. I just dropped my mini (a whole 4 feet) and now it's broken. The drive is busted. I can hear it just clicking away and then I get the un-happy mac icon. Since it's past its warrantee and I don't have apple care for it, either I replace the hard d
-
How to render side navigation menu programmatically.
Hi all, I Have standard pages (i.e Customer online pages ) when I navigate one page to another page 2nd page have side navigation menu This page is attached as first page in side navigation menu so by default this menu is displaying if I navigate fro
-
Characterstic value assignment table
Hi All Could you please let me know in which table can i find characterstic value assignment data? Thanks in advance Nagesh.paruchuri
-
Jdev 10.1.3.4 migration issue
Dear all, I encountered the following problem. I performed the migration of my application from jdev 10.1.2. following the wizard. When I try to build the WEB module, the compiler is not able to find struts tags and <jsp:include ...>. I have a direct
-
Another GUI problem:)
Hi, I'm trying to make a program creating a genealogy tree. On the screen there will be boxes representing people - they have to be in a strict order acording to the family links. What I want to reach is positioning these boxes on diffrent levels (ov