Powershell:
Search-ADAccount -LockedOut
Powershell:
Search-ADAccount -LockedOut
Pre req is to install passlib as Ansible doesn’t allow a cleartext password to e passed through the User module:
pip install passlib
Play book to update the username dave:
--- - hosts: all become: yes tasks: - name: Change user password user: name: dave update_password: always password: "{{ newpassword|password_hash('sha512') }}"
Run the playbook:
ansible-playbook -i hostfile change-password.yml --extra-vars newpassword=imanewpassword
Check Ethernet card (NIC) supports Wake On LAN:
ethtool eth0 | grep Wake-on
*Make sure that ‘g’ is included as one of the options for ‘Supports Wake-on: ‘ e.g. Supports Wake-on: pumbg
**Substitute eth0 with correct interface
Configure the NIC to wake on MagicPacket:
ethtool -s eth0 wol g
Persist the change by editing /etc/sysconfig/network-scripts/ifcfg-eth0 and appending:
ETHTOOL_OPTS="wol g"
Shutdown and test WOL.
sed -rne '/Wed Aug 19 21:34:00/,/Wed Aug 19 21:40:00/ p' logfile.log
The timestamp in the log file in this case was in the following format:
Wed Aug 19 21:39:59 2020
keytool -list -v -keystore keystore.ts -storepass PASSWORD
Recent Comments