Change Password and Unlock a bunch of users in AD

As Paul Venezia has outlined in is “Nine traits of the veteran Unix admin“:

Veteran Unix admin trait No. 8: We know more about Windows than we’ll ever let on

Though we may not run Windows on our personal machines or appear to care a whit about Windows servers, we’re generally quite capable at diagnosing and fixing Windows problems. This is because we’ve had to deal with these problems when they bleed over into our territory.

so when there is to reset the (same) silly password for tens test users on Active Directory and then unlockt them, who you gonna call©?

Someone that can’t despise more powershell to write something like this:

for($i=1; $i -le 70; $i++) { 
 $silly="sillyuser$i"
 Write-Output $silly
 Set-ADAccountPassword -Identity "$silly" -Reset -NewPassword (ConvertTo-SecureString -AsPlainText 'VerySecurePassword' -Force)
 Unlock-ADAccount -identity "$silly"
}

I’m keeping track here for the next time…

Bookmarks for 26 Mar 2016 through 29 Mar 2016

These are my links for 26 Mar 2016 through 29 Mar 2016:

  • Painless Immutable Infrastructure with Ansible and AWS | Radify Blog – […] In our blog posts Reducing Infrustration and Immutable Demo Nodes, we talk about our approach to immutable infrastructure and the benefits we have seen from employing this approach. In this article, we explore a practical project example so you can get up and running with immutable infrastructure in less than an hour! […]
  • pearofducks/ansible-vim: A vim plugin for syntax highlighting Ansible’s common filetypes – A vim plugin for syntax highlighting Ansible’s common filetypes
  • Provisioning EC2 Hosts with Ansible | Allan Denot – Looking to build EC2 hosts with more consistency? Using Ansible you can easily provision EC2 hosts and put some logic on it to adjust EC2 parameters based on the type of host you are building.
    The easiest way to start is to create a playbook calling the ec2 module with the parameters you want to pass to AWS to create your host. In this post I will show a little more scalable way to do this, where the parameters are variables and you can easily have multiple types of hosts sharing the same playbook and role.

Bookmarks for 29 Mar 2016 through 8 Apr 2016

These are my links for 29 Mar 2016 through 8 Apr 2016:

  • VMware: Add PortGroup to all hosts in cluster with PowerCLI – […]
    Today we configured a new VLAN on the physical switches, now we need to configure a portgroup with vlan id on multiple ESX hosts in our cluster. To do this by hand it will cost 3 minutes per host, to script this.. you configure this in 10 seconds![…]
  • Creating Active Directory Accounts – Microsoft stores a quoted password in little endian UTF16 base64 encoded.
  • LVM Loopback HOW-TO | Anthony’s Blog – This is a simple tutorial on setting up LVM on loopback devices, I’ve used it a few times for creating dynamic virtual disks; it came in particularly handy when archiving NEXRAD radar data for my radarwatchd project – using up all your inodes on several hundreds of thousands of 15Kb files doesn’t sound like my idea of fun. Creating a virtual volume with reiserfs was a particularly handy solution in this case.
  • Retroshare – Retroshare creates encrypted connections to your friends. Nobody can spy on you. Retroshare is completely decentralized. This means there are no central servers. It is entirely Open-Source and free. There are no costs, no ads and no Terms of Service.

Bookmarks for 24 Mar 2016 through 25 Mar 2016

These are my links for 24 Mar 2016 through 25 Mar 2016:

  • Coderwall | Dump all variables – For debugging purposes it can be useful to not just dump hostvars but also all other variables and group information. You can do this using a jinja template which you could include in a debug task
  • Using Ansible to create AWS instances | Tivix – Ansible is a great tool for enhancing productivity. With a vast array of modules to choose from, it can save you a lot of time by automating away common tasks. At Tivix we use it for single-command deployment, with the most common destination being Amazon EC2 instances created beforehand. Since Ansible is capable of managing EC2 resources, we can improve this setup by making a playbook to create an instance for us.
  • Home | OpenSCAP portal – The OpenSCAP ecosystem provides multiple tools to assist administrators and auditors with assessment, measurement and enforcement of security baselines. We maintain great flexibility and interoperability, reducing costs of performing security audits.
    The OpenSCAP project provides a wide variety of hardening guides and configuration baselines developed by the open source community, ensuring that you can choose a security policy which best suits the needs of your organization, regardless of its size.
    SCAP is U.S. standard maintained by National Institute of Standards and Technology (NIST). The OpenSCAP project is a collection of open source tools for implementing and enforcing this standard, and has been awarded the SCAP 1.2 certification by NIST in 2014.
  • Wazuh | Augmenting OSSEC Host IDS – Wazuh contributes to Open Source Security developing and integrating new modules to extend OSSEC capabilities and functionality.