Sunday, 27 June 2021

Verify the AD account's password

To confirm AD account's password.

Method

1. Run the PowerShell with command below:

Start-Process -FilePath cmd.exe /c -Credential (Get-Credential)


2. Enter AD account you wish to verify.

Example:

Users name: contoso\administrator

Passowrd: Abc123!!!


Caution: Account may locked if you enter wrong password. (settings depend on you password policy)

Sunday, 6 June 2021

Cisco - Configure ACL (Extended)


Scenario

IP: Any VLAN20 (203.20.36.0/24) deny access VLAN10 (203.20.5.0), except host 203.20.5.200


Info

access-list extended name = FROM_VLAN20

VLAN ID = 20


Step

1. Create extended access-list. (I named it FROM_VLAN20)

Router1(config)#ip access-list extended FROM_VLAN20


2. Create 2 access lists under access-list extended VLAN20.

Router1(config-ext-nacl)#10 permit ip any host 203.20.5.200

Router1(config-ext-nacl)#100 deny ip any any

(*the red number is weight)


3. Specify access control for packets on interface VLAN 20.

Router1(config)#interface Vlan 20

Router1(config-if)#ip access-group FROM_VLAN20 in



4. To show inter VLAN's access group.

Router1#sh run



5. To show access list with weight.

Router1#sh acc



Tuesday, 1 December 2020

Microsoft SQL - Enable SQL Audit Log (in Windows security log)

Prerequisite

1. Enable Audit Object Access.

  • Go to local computer policy (go to RUN, type gpedit.msc). If server manage by GPO, apply in GPO.
  • Go to Computer Configuration >  Windows Settings > Seurity Settings > Local Policies > Audit Policy > Audit Object Access
  • Enable the policy (check the Success or/and Failure)


2. Grant right to SQL service account.

  • Go to local computer policy (go to RUN, type gpedit.msc). If server manage by GPO, apply in GPO.
  • Go to Computer Configuration >  Windows Settings > Seurity Settings > Local Policies > User Right Assignment > Generate security audits
  • Add SQL service account.


3. Change Registry value (optional)

  • Go to Registry  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\Security\MSSQL$<InstanceName>$Audit\EventSourceFlags
  • Change the value from 0 to 1.



Enable SQL Audit Log


1. Connect to SQL database with SQL Management tool.
2. Go to Security > Audits.
3. Right on Audit, select New Audit...
4. Configure audit settings. Select audit destination, Security log.


5. Right click on the newly created audit, select Enable audit.

Sunday, 8 November 2020

File Server Resource Manager - Quota size not reset / update

Issue: Files deleted in quota folder but disk size not reduce.


Solution 1: Run command below in cmd:-

dirquota quota scan /path:<path>


Example 1 (for folder specified by path):

dirquota quota scan /path:D:\.

Example 1 (for all immediate subfolders of path):

dirquota quota scan /path:D:\*

Example 1 (for fall recursive subfolders of path):

dirquota quota scan /path:D:\...


* you can create a batch file and run in task scheduler

Sunday, 1 November 2020

This App has been blocked by your system administrator

 


Solution:

1. Go to Regedit

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

Value Name: ConsentPromptBehaviorUser

Value: 3



Friday, 24 July 2020

#WSUS - Remove WSUS completely / Reinstall WSUS with fresh data

1. Run the Powershell command below to uninstall the WSUS:-

Remove-WindowsFeature -Name UpdateServices,UpdateServices-DB,UpdateServices-RSAT,UpdateServices-API,UpdateServices-UI -IncludeManagementTools

2. Remove WSUS database.

For SQL: 

Delete the SUSDB.mdf and SUSDB_log.ldf in SQL database.

For WID (Windows Internal Database):

Delete SUSDB.mdf and SUSDB_log.ldf in C:\Windows\WID\Data.


Monday, 30 March 2020

Reset Root Account Password of VMware vCenter Server Appliance (version 5.5 and 6.0)

1. Reboot the vCenter Server Appliance from vSphere Client.

2. When GRUB bootloader appears, press the spacebar to disable the autoboot.

(You can set Power On Boot delay by edit the vm settings)

3. Press p to access the appliance boot options.

4. Enter teh GRUB password. 

(If the vCenter Server Appliance was deployed without editing the root password in the Virtual Appliance  Management Interface (VAMI), the default GRUB password is vmware. If edited, use last set password in VAMI)

5. Select the VMware vCenter Server Appliance and type e to edit the boot commands.

6. Select kernal boot parameters. (example: kernal /vmlinuz-3.0.101-0 ........... resume=/->)

7. Type e to boot the command.


8. Type init=/bin/bash to the kernal boot options. The hit enter button.

9. Type b to start the boot process.

10. Type passwd root to change the root password.

11. Enter your new root password.

12. Screen show password successfully changed.

13. Type reboot to reboot.

*if you unable to reboot run these commands:

mkinfo /dev/initctl

reboot -f