- Block notifications in Chrome, Edge, and Firefox - Tue, Nov 29 2022
- VMware vSphere 8: Editions, licensing, and pricing - Mon, Nov 21 2022
- Automate file downloads with Windows FTP or curl - Wed, Nov 16 2022
If you make a server a member of an AD group, for example, to include it in the security filtering of a GPO or to grant it permissions to request a certificate, it simply may not be possible to restart it immediately afterwards. However, a reboot is usually necessary to update computer membership in AD groups.
Purging Kerberos tickets ^
You can bypass the reboot by renewing the Kerberos ticket for the computer with klist.exe. If you run
klist.exe sessions | findstr /i %COMPUTERNAME%
on a command prompt, you will see that the so-called low part of the local computer's LogonID always has the value 0x3e7, while 0x3e4 belongs to the network service. The corresponding cached Kerberos tickets can be displayed with
klist.exe -li 0x3e7
After adding the computer account to a new security group in AD, you can remove them using the purge parameter:
klist.exe -li 0x3e7 purge
Subsequently, by executing
you will get new tickets. If you run
klist.exe -li 0x3e7
again and compare the output with the earlier use of this command, you will see that the timestamps of the Kerberos tickets have changed.
gpresult /r /scope computer
you can display the groups in which the local computer is a member. However, this command usually does not reflect changes after the ticket was renewed, regardless of whether the account was added to or removed from a group.
However, if you use an AD group for GPO security filtering, then the change has an immediate effect here and is also visible in the output of gpresult. The same applies to the permissions on other resources.
Updating memberships for users ^
While servers often cannot be restarted just to update membership in AD groups, it is usually not a major problem for users to log off and on again to gain access to certain resources by changing group memberships.
However, if you want to avoid a logoff, klist.exe can help here as well. In this case, after the user account has been added to a new group, execute
on a command line without elevated privileges. The program prints the LogonID of the current user and confirms that the Kerberos tickets for this user have been deleted. To get new ones, you can start another instance of cmd.exe using runas.
If you run
there, then the change in the group memberships should already be noticeable. Accordingly, the user should also be able to access a network share, for example via the FQDN of the server, which he was denied before he was added to the new AD group.
Subscribe to 4sysops newsletter!
It is obvious that the described solution works only for services that support Kerberos. With NTLM authentication, there is no way around rebooting or logging out.