October 2016

Active Directory: Changing passwords for users in bulk using a .csv file

Many accounts in your AD might need a password change. What if you want to do this in bulk ?

First, we need to the userlist. Depending on your requirements we need to get a list of users (specifically samaccountname). For random password generation I recommend using http://manytools.org/network/password-generator/ as it can generate up 1000 for free.

Here is what my UserList.csv look like:

Make sure you do the following on a domain controller or connecting to your domain controller via PS-remote with elevated permissions.

Run this in PowerShell (Open PowerShell in Admin Mode)

PowerShell:

-Reset
Specifies to reset the password on an account. (User is not prompted to change password).
To use this parameter, you must set the -NewPassword parameter.
You do not need to specify the -OldPassword parameter.

Extending the Booking days for Conference Room Calendar (Resource)

By default Office365 limits Resource booking days to just 180 days. The maximum days it can be booked for 1080 days.

I like to make resource booking days 1 year from the day of making the reservation/ appointment. Now instead of visiting each calendar and making the change, powershell can help us out.

Happy Booking!

Linux: CentOS 6 kernel panic+0xa7/0x16f fix

So ran into a view issue for a Linux Host today. Kernel Panic !!!

There could be a number of reasons that you might get this error. The three common reasons may be:

  1. There was a change to selinux config – (that might be an error in the config file)
  2. There are disk errors
  3. The kernel is corrupted

None of the kernels in the GRUB boot menu will boot, you get a kernel panic:

1-kernel-panic

Kernel panic – not syncing: Attempted to kill init!
Pid: 1, comm: init Not tainted 2.6.32-504.3.3.el6.x86_64 #1
panic+0xa7/0x16f
do_exit+0x862/0x870
fput+0x25/0x30
do_group_exit+0x58/0xd0
sys_exit_group+0x17/0x20
system_call_fastpath+0x16/0x1b

Booting in single user mode doesn’t work either.

Here’s how to fix this:

            1. Reboot, and go in the GRUB menu. You have 3 seconds to strike the arrow keys before it will automatically boot the default kernel.2-grub-menu
            2. Select the first line, the default kernel, and press the E key on the keyboard to edit the parameters. You will then see the following.
              3-grub-edit
            3. Use the arrow keys to select the 2nd line, that starts with kernel. Press the E key to change this line, use the arrow keys to go to the end and type a space followed by enforcing=0
              4-grub-edit
            4. Press enter to conform and then press B to boot the system.
              It should boot up fine now.
            5. Choose your solution:

              SELINUX Config FileDisk ErrorsRebuild Kernel

              Disabled for the SELINUXTYPE variable, that’s wrong it has to be for the SELINUX variable. In the screenshot below I show you the correct settings in the config file to disable SELINUX.

              5-selinux-disabled

            6. Reboot.

VMware: Intermittent Error: Unexpected character ‘’ (code 65279 / 0xfeff) in prolog; expected ‘<' at [row,col {unknown-source}]: [1,1] pop up in Windows vSphere client ?

Recently, I got the error below when using the vSphere client.

Problem:

error

I have only tested this solution on:

2016-10-04_11-41-47

Solution:

Repair your installation of Microsoft Visual J#® 2.0 Redistributable Package – Second Edition (x64)

Download

The error went away after repair.

In trying to google the error some user have reported that uninstall the patch KB3147458 worked for them. I didn’t have the patch.

Hope this helps.