• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Yellow Bricks

by Duncan Epping

  • Home
  • Unexplored Territory Podcast
  • HA Deepdive
  • ESXTOP
  • Stickers/Shirts
  • Privacy Policy
  • About
  • Show Search
Hide Search

Additional user account in a scripted install

Duncan Epping · Nov 4, 2008 ·

When doing a scripted install it might be useful to create additional user accounts. You can easily do this with the following command:

/usr/sbin/useradd -m -p ‘\$1$ZRo.R0\$1Lk8iA0AaqVFlojm.BTmr/’ -c administrator -g users -G users -d /home/administrator -s /bin/bash administrator

The “-p” value is the encrypted password. You can create them by using the tool “grub-md5-crypt” on a linux box. Just type “grub-md5-crypt” and type your password twice and it returns a md5 encrypted password which you can use in your scripted install. Keep in mind that there can be special characters in your password, if you do a scripted install this will be misinterpreted and you these characters need a preceding “\”.

Related

Server ESX, Scripting, security

Reader Interactions

Comments

  1. Daniel Hernandez says

    4 November, 2008 at 18:20

    Interesting you posted this today because I was actually searching on this yesterday. I had already figured it out. But how ironic you posted.

    This method is good for new builds but how about if you want to add the account on new builds as well as already deployed host. I will have to dig into the RCLI to see if the RCLI can retro fit an environment.

    An ESX admin would need an automated setup which allows you to login into every host which my environment already has utilizing SSH Keys. But not as clean as I would like it.

    But am always looking for ways to improve the environment and keeping consistency.

    So I wonder if I can modify the script below to add accounts to each existing ESX host without storing the pass in plain text. Id like to leverage using the MD5 hash. Allowing other Administrators to create there own MD5 hash that way no one truly knows there pass, and the PowerShell just gets ran across the environment.

    http://communities.vmware.com/servlet/JiveServlet/download/1014729-12094/createuser3.ps1?tstart=0&start=15

    Thanks for the great blog.

  2. Daniel Hernandez says

    4 November, 2008 at 19:26

    Just to add to my existing post. The reason I also like the Powershell method is because it allows access to the VIC also. I dont know of a quick command in the service console to add a user to the VIC my experience an XML file needs to be changed.

Primary Sidebar

About the Author

Duncan Epping is a Chief Technologist and Distinguished Engineering Architect at Broadcom. Besides writing on Yellow-Bricks, Duncan is the co-author of the vSAN Deep Dive and the vSphere Clustering Deep Dive book series. Duncan is also the host of the Unexplored Territory Podcast.

Follow Us

  • X
  • Spotify
  • RSS Feed
  • LinkedIn

Recommended Book(s)

Advertisements




Copyright Yellow-Bricks.com © 2025 · Log in