Create local users with random passwords in Window Server

Server Administration | February 8th, 2010

I recently worked on a project where I had to write a script to create local users and add them to groups in Windows Server 2003. It was for VMWare’s vSphere software. It uses local groups and users as users of the center, and allows you to assign privileges with these. Creating these users and assigning them to groups is easy with a simple script:

The follow script does a few things:

  • Creates multiple users with similar names (user1, user2, user3)
  • Generates a password of random numbers, upper and lowercase letters
  • Assigns the users to a group (the group must exist before using the script)
  • Stores the generated usernames and passwords to a text file

(more…)

Hide PHP extension in URL using .htaccess

Server Administration | February 7th, 2010

What?

Hide the .php extension of your PHP files in the URL of your site address.

Instead of:
http://www.example.com/page.php
Visitors to your site will see:
http://www.example.com/page/

Why?

There are actually quite a few reasons to do this.

  • Make your URLs cleaner and easier to remember for visitors
  • Make dynamic pages appear static for SEO
  • Security by obscurity (albeit very weakly so)—visitors cannot tell as easily that you are using PHP
  • For fun (yay!)

(more…)