Manage Local Admin Passwords – Additional Comments

Todays work consists of implementing a system for managing local admin passwords for Servers and Workstations in an Active Directory Environment. I have used the method in the following (excellent) article series from the PlatformPFE team at Microsoft.

Part 1 – Overview
Part 2 – Random Password Generation
Part 3 – Secure Active Directory Attribute Update
Part 4 – Update Local Account’s Password
Part 5 – Logging The Update Process
Part 6 – Extending The Active Directory Schema
Part 7 – Managing Local Administrators Passwords

In short this series uses a new attribute in AD (set to confidential) to store the local admin password. The password is changed and written to the attribute using a powershell script which is run on every startup of a computer.

There are some aspects of the solution that where not completely obvious to me so I thought I would write the down so I won’t forget them:

The Confidential attribute is a flag that is set on the attribute which requires not only Read Permissions but also CONTROL_ACCESS to the attribute to be able to read it.

There are some limitations:

  • The confidential flag cannot be applied on most of the default attributes. It is however applied to some default attributes such as Bitlocker Recovery Keys
  • The CONTROL_ACCESS permission is default set for members of administrators and account operators in active directory which means that these users will always have access to to confidential attributes.
  • The CONTROL_ACCESS permission can only be set using LDP.exe (which I will explain later how to do). You will need to do this if you want to allow users not member of  administrators and account operators to access the local admin password

To set the CONTROL_ACCESS permission for the AD-MemberServers OU-Read-Attribute-LocalAdminPWD group (described in the series), do the following:

  1. Start LDP.exe elevated as a Domain Admin User
  2. Connect to your domain controller

    image

  3. Bind LDP to the domain using your user account

    image

  4. Turn on the tree view in LDP

    image image

  5. Browse to the OU where you set up permissions and open Security Descriptor

    image
     

  6. Double-click the ACL you set to open it and check the Control Access box. Click OK when you are done

     image
     
    Note: If you set up the  password solution for Workstations to you will need to repeat the procedure for the workstation OU

  7. Done

Addendum:

To verify if all computers have a local admin password set you can run:

$Filter = {(-not(LocalAdminPWD -like “*”))}
Get-ADComputer -Filter $Filter  -Properties LocalAdminPWD | ft Name,LocalAdminPWD

Links

http://blogs.technet.com/b/craigf/archive/2011/01/26/delegating-access-in-ad-to-bitlocker-recovery-information.aspx
http://blogs.technet.com/b/platformspfe/archive/2014/05/13/part-7-managing-local-administrator-passwords.aspx

AD Demotion

I am currently helping a customer with upgrading all of their old DCs. When I tried to demote one of the DCs I got the following error message:

Title bar text: Active Directory Domain Services Installation Wizard
Message Text:
The operation failed because:
Active Directory Domain Services could not transfer the remaining data in directory partition
DC=DomainDNSZones,DC=<DNS domain name>
to
Active Directory Domain Controller
\\OtherDC
“The directory service is missing mandatory configuration
information, and is unable to determine the ownership of floating single-master operation roles.”

The problem is that each of the application Partitions for DNS has a FSMO and this name is present in more than one place. If these location does not match you will get the above error. To verify that this is actually the problem you can check the following parameters in ADSI Edit:

In ADSI edit connect to Default naming context and browse to CN=Infrastructure,DC=domain,DC=local and verify fSMORoleOwner

Then connect to CN=Infrastructure,DC=DomainDNSZones,DC=domain,DC=local and check that the fSMORoleOwner is the same as above. Perform the same operation for CN=Infrastructure,DC=ForestDNSZones,DC=domain,DC=local

If these do not match up the is a VB Script from MS you can use to fix it:

const ADS_NAME_INITTYPE_GC = 3
const ADS_NAME_TYPE_1779 = 1
const ADS_NAME_TYPE_CANONICAL = 2

set inArgs = WScript.Arguments

if (inArgs.Count = 1) then
    ‘ Assume the command line argument is the NDNC (in DN form) to use.
    NdncDN = inArgs(0)
Else
    Wscript.StdOut.Write “usage: cscript fixfsmo.vbs NdncDN”
End if

if (NdncDN <> “”) then

    ‘ Convert the DN form of the NDNC into DNS dotted form.
    Set objTranslator = CreateObject(“NameTranslate”)
    objTranslator.Init ADS_NAME_INITTYPE_GC, “”
    objTranslator.Set ADS_NAME_TYPE_1779, NdncDN
    strDomainDNS = objTranslator.Get(ADS_NAME_TYPE_CANONICAL)
    strDomainDNS = Left(strDomainDNS, len(strDomainDNS)-1)
    Wscript.Echo “DNS name: ” & strDomainDNS

    ‘ Find a domain controller that hosts this NDNC and that is online.
    set objRootDSE = GetObject(“LDAP://” & strDomainDNS & “/RootDSE”)
    strDnsHostName = objRootDSE.Get(“dnsHostName”)
    strDsServiceName = objRootDSE.Get(“dsServiceName”)
    Wscript.Echo “Using DC ” & strDnsHostName

    ‘ Get the current infrastructure fsmo.
    strInfraDN = “CN=Infrastructure,” & NdncDN
    set objInfra = GetObject(“LDAP://” & strInfraDN)
    Wscript.Echo “infra fsmo is ” & objInfra.fsmoroleowner

    ‘ If the current fsmo holder is deleted, set the fsmo holder to this domain controller.

    if (InStr(objInfra.fsmoroleowner, “\0ADEL:”) > 0) then

        ‘ Set the fsmo holder to this domain controller.
        objInfra.Put “fSMORoleOwner”,  strDsServiceName
        objInfra.SetInfo

        ‘ Read the fsmo holder back.
        set objInfra = GetObject(“LDAP://” & strInfraDN)
        Wscript.Echo “infra fsmo changed to:” & objInfra.fsmoroleowner

    End if

End if

Paste it into a file called fixfsmo.vbs and run it

cscript fixfsmo.vbs DC=ForestDnsZones,DC=domain,DC=local
cscript fixfsmo.vbs DC=DomainDnsZones,DC=domain,DC=local

ADFS 3.0 with Windows XP (??) Clients

Today I spent the day at a customers looking at a XP computer (I know they are supposed to be extinct) having problems authenticating using ADFS. As we know XP is using IE8 and IE8 in combination with XP does not support Server Name Indication. Turns out SNI is on by default in ADFS 3.0… bummer

Fortunately it is fixable:

Start by getting information about the SST Certificate using:

netsh http show sslcert

The we bind the IP:port combination to the SSL cert using (in an elevated command prompt):

netsh http add sslcert ipport=[ipaddress : port from above] certhash=[Certificate Hash from above] appid=[appid from above] certstorename=MY

These steps needs to be taken on both the ADFS server and the Web Application Proxy

IMPORTANT: This works as long as the Web Application proxy is not doing anything else but working as a “ADFS Proxy”

Link:
http://hindenes.com/trondsworking/2014/03/25/adfs-3-0-windows-xp-fail/

The User Profile Service service failed the logon in Microsoft Exchange

I do not know how many times I said to myself that I should write a post about this problem

Sometimes when trying to log on to an Exchange 2010 server, you receive the following error message:

The User Profile Service service failed the logon
User Profile Can not Be Loaded

the problem is access to a file in the user’s profile. This is copied from the default profile so it does not help to remove the profile and create a new one.

The file is:

C: Users Default AppData Local Microsoft Exchange Server V14 CmdletSqmData3700_100.sqm

The solution is change the permissions on the files in the default profile to Everyone – Full Control

Edit: moved around some text, then I do not korrläst properly. Thanks Anders A

“The User Profile Service service failed the logon” på Microsoft Exchange

Jag vet inte hur många gånger jag sagt till mig själv att jag skall skriva en post om detta problem

Ibland när man försöker logga in på en Exchange 2010 server kan man få upp följande felmeddelande:

The User Profile Service service failed the Logon
User Profile Cannot Be Loaded

problemet är åtkomst till en fil i användarens profil. Denna kopieras från defaultprofilen så det hjälper inte att ta bort sin profil och skapa en ny.

Filen är:

C:\Users\Default\AppData\Local\Microsoft\Exchange Server\V14\CmdletSqmData3700_100.sqm

Lösningen är ändra rättigheterna på filerna i default profilen till Everyone – Full Control

Edit: flyttade runt lite text då jag inte korrläst ordentligt. Tack Anders A

The Nerd Herd – Avsnitt 63 – Params, Pipelines och På minuten

Idag pratar vi vidare om Powershell. Hur kan man paketera sina script så att andra kan använda dem? Hur kan jag få dem att fungera tillsammans med andra CMDlets? Vi kikar på hur man bygger ett param block fög att göra sitt scritp med generellt.
 
Source: The Nerd Herd

Idag pratar vi vidare om Powershell. Hur kan man paketera sina script så att andra kan använda dem? Hur kan jag få dem att fungera tillsammans med andra CMDlets? Vi…

MDM för Intune – del 4

I den här delen skall vi kika på hur vi ansluter en iOS enhet till Intune

Börja med att klicka på Upload an APNs cetificate

image

Ladda ner certifikatsförfrågan genom att klicka  Download the APNs certificate request och spara den på din dator

image

Klicka på länken för att ansluta till Apples Certifikats portal och logga in med ditt Apple ID. Klicka på Create a Certificate för att komma vidare och godkänn licensavtalet.

image

Ladda upp certifikatsförfrågan till Apple

image

Ladda ner certifikatet från Apple

image

Och ladda upp det till Intune

image

image

Nu är det dax att koppla upp den mobile enheter. Starta Safari på Din iOS enhet och surfa till portal.manage,microsoft.com och logga in med enhetens användare

IMG_0007_thumb   IMG_0008_thumb[1]

Klicka på Installera och fullfälj installationsguiden

IMG_0009_thumb   IMG_0010_thumb   IMG_0011_thumb   IMG_0012_thumb

När installationen är klar kan du gå in under Profiler in Inställningar och verifiera att profilen är installerad

IMG_0013_thumb

Gå tillbaka till Windows Intune och verifiera att enheten dyker upp

image[4]_thumb

/Johan

MDM för Intune – del 3

Vi har i tidigare postningar konfigurerat grunderna för MDM i Windows Intune och lagt till en Windows Phone… Nu skall vi kika på hur man gör för att ansluta en Android telefon. Tidigar har man enbart kunnat hantera Android enheter genom att koppla ihop Intune med en Exchange server och använda ActiveSync som kontrollkanal. Numera finns det en applikation 🙂

Börja med att installera Windows Intune Company portal appen från Play Store och starta den

Screenshot_2014-03-20-18-39-32

Klicka Lägg till den här enheten och skriv in dina inloggningsuppgifter och logga in

Screenshot_2014-03-20-18-42-34

Aktivera applikationen som enhetsadministratör (för att kunna verkställa policies mm)

Screenshot_2014-03-20-18-43-54

Nu är enheten klar. Verifiera i Windows Intune att den är tillagd

image

Johan

MDM för Intune – del 2

I förra delen gjorde vi grunduppsättnignen för MDM i Windows Intune. I denna del kikar vi på hur vi lägger till en Windows Phone 8 enhet i Intune

Vi börjar med att gå till Windows Phone 8 segmentet i Intune

image

För att kunna ansluta en Windows behöver vi skapa en Company Portal App… som tur är finns det ett färdig exempel i Intune som vi kan använda. Klicka för att ladda ner sample appen

image

När appen är nedladdad, installera den på din dator med sandardinställningar (det enda installationen gör är att packa upp filerna)

Ladda sedan upp filen till Windows Intune

image

När du klickar på knappen kommer du att ladda ner Windows Intune Software Publisher och starta den. Logga in i applikationen.

image

Välj Upload Windows Phone 8 company portal app file

image

Välj xap-filen du packade upp tidigare

image

Skapa en kort beskrivning av applikationen och ladda upp applikationen till intune

image

Nu är det dax att ansluta din telefon. Börja med att gå till Settings – Company Apps

wp_ss_20140320_0006

Klicka på Add Account för att börja anslutningen

wp_ss_20140320_0005

Skriv in dina inloggningsuppgifter. Detta behöver göras i 2 steg

wp_ss_20140320_0002     wp_ss_20140320_0003   

Klicka Done och du är klar. Verifiera att din enhet syns i Windows Intune (detta kan ta några minuter)

image

/Johan

MDM för Intune – del 1

Jag tänkte på att dokumentera lite av MD funktionaliteten i Windows Intune. Först tänkte jag börja med hur man aktiverar portalen för att sedan kika på hur man lägger till respektive mobil OS… I denna första post gör vi de nödvändiga konfigurationsstegen för att få igång det.

Till att börja med behöver vi ett Intune abonnemang, så börja med att logga in och skapa ett.

Vi börjar med att skapa ett användarkonto med en Intune licens

image

Tilldela en licens

image

Glöm inte bort att logga in med det nya kontot på portal.manage.microsoft.com för att skapa ett nytt lösenord

image

Gå till admin konsollen i Intune och gå ner till Mobile Device Management

image

Vi börjar med att skapa en Mobile Device Management Authority, länken finns längst upp till höger.

image

image

Så, då var grunderna uppsatta…

I nästa postning kikar vi på hur vi lägger till en Windows Phone 8 enhet

/Johan