Showing posts with label COMMAND. Show all posts
Showing posts with label COMMAND. Show all posts

Wednesday, July 29, 2015

Creating Keytab for UNIX machines access in Active Directory

For UNIX servers can gain access to AD and that they can take an active object in AD as well as the possibility of SPNs we record for them, work with Kerberos authentication in a transparent, etc. What makes it all possible is the Keytab that is generated by Ktpass tool (native Windows tool).
Below example command to generate the Keytab (remembering that the computer object in AD must be previously created):
ktpass / princess host / COMPUTER.domain.test@DOMAIN.TEST / out NomeDoArquivo_host.keytab / crypto All / ptype KRB5_NT_PRINCIPAL -desonly / mapuser DOMAIN \ COMPUTER $ + rndPass
Replace:
COMPUTER = Computer Name
DOMAIN.TEST = Domain Name
DOMAIN = Netbios Domain
note: -Necessary align with the UNIX team to computer names and domain involved in the command will be charged with lowercase or uppercase letters.

Tuesday, July 28, 2015

Kill TS sessions remotely

Classic problem: You try to connect remotely to a server via TS and no connections available ...
One of the possible ways to disconnect these sessions, is through an executable called RESET.EXE included in Windows 2003 and later (at least until Windows Server 2012R2 it still exists ... rss ... remembering that this EXE is also found in versions customers Windows).
Below is an example of the command syntax:
To list the sessions of the remote machine, run the following command:
query session / server: NomeDoServidor_ou_IP
The listing of the sessions is necessary, in order to have access to the session ID.
To "overthrow" the session, run the following command:
reset session IDdasessão / server: NomeDoServidor_ou_IP
I hope you find it useful!