HowTo: Update a user's group memberships in Windows without logging off/on

If you have set up new group memberships for a user, the user can only use these groups effectively after the local security token has been updated on the computer on which the user is logged on.

If a user is working locally, the easiest way is to log out and log back in again. Then - when the connection to the domain controller is established - a new security token with all current group memberships is created and saved locally.

This can be a problem for remote users who only connect to the domain controller via VPN after logging on locally ... as they are not connected to the network when logging on and therefore cannot connect to a domain controller to get an updated security token receive. Of course, there are times when some on-site users may not like to close everything to log out and back in. How do you get around that?

Here's the trick in 3 easy steps:

Step 1: Connect to the domain controller

Wenn wir es mit Remote-Benutzern in einem VPN zu tun haben, lassen Sie sie sich zuerst mit dem VPN verbinden, bevor Sie etwas anderes tun.

Step 2: Kill Explorer.exe

Öffnen Sie den Task-Manager und beenden Sie explorer.exe. Das Startmenü des Benutzers und alle geöffneten Ordner sollten nun ausgeblendet werden.

Step 3: start a new new Explorer.exe via RunAs

In dem geöffneten Task-Manager starten Sie über "Datei" -> "Neuen Task Ausführen" -> RunAs /user:MYDOMAIN\username explorer.exe [Enter drücken] [Passwort des Benutzers eingeben] [Enter drücken]


Das Startmenü sollte jetzt wieder angezeigt werden, und dieser neue Explorer.exe wird sich der neuen Gruppenmitgliedschaft bewusst sein, so dass sie in Ordner gelangen können, die sie zuvor nicht konnten, da die Gruppenmitgliedschaftsinformationen nicht aktualisiert wurden :) Job erledigt! 
Start a new explorer process

Check group memberships

Starten Sie ein neues CMD Fenster und führen "WhoAmI /groups".
In beiden Fällen werden Ihnen die jetzt alle Gruppen angezeigt, die der Token des aktuellen Explorer Prozesses enthalten.

Wichtig: Applikationen, die schon vorher gestartet waren, können diesen Token nicht nutzen. Falls Word z.B. die Datei genau in dieses über die Gruppen neu berechtigte Verzeichnis legen abspeichern will, so wird das nicht funktionieren. In dem Fall muss Word neu gestartet werden.

Execution as CMD

This action can also be simplified for the user via a CMD. Simply place this CMD on each user desktop.

For the remote users, this CMD should also be executed immediately after the connection has been established. Many VPN clients support exactly this.

taskKill /F /IM explorer.exe
RunAs /user:Domain\%username% explorer.exe

Background info

RunAs always uses the Windows Logon functionality against an accessible domain controller.

If you need the new group memberships with a certain application, it is sufficient that only this application is started with RunAs via the CMD.

Under Windows, the “Run as another user” or “Run as administrator” function usually produces the desired result.

Permanent link to this post: https://help.migraven.com/howto-gruppenmitgliedschaften-eines-benutzer-in-windows-ohne-ab-anmelden-aktualisieren/

Leave a Comment

Your email address will not be published.