PowerVM

 View Only

 Creating VIO Server users with a script

Falko Huetter's profile image
Falko Huetter IBM Champion posted Thu April 02, 2026 04:23 AM

Hello,

I'm using VIO version 4.1.

Is it possible to create users on VIO servers using a script with mkuser?
Ansible would also be acceptable.

With mkuser, you're always prompted for a password.
I'd like to specify a password that must be changed upon first login.

Thanks in advance.

Deepak Menezes's profile image
Deepak Menezes

Hello Falko,

Yes user created from padmin prompts for a new password during creation (Unlike from root where it creates the user and sets the Encrypted Password field as * ) 


Question: Is it possible to create users on VIO servers using a script with mkuser?  

Yes you can create users using script . There is no restriction . Coming to if there is ready made script for this , then answers is no. But you can check the VIOS Ansible module library if this use case exist .
https://ibm.github.io/ansible-power-vios/installation.html

Question:- I'd like to specify a password that must be changed upon first login.

This can be achieved using below 

 pwdadm -f ADMCHG <username>

  • Example: pwdadm -f ADMCHG testuser

P T's profile image
P T

As padmin no (easy?) way without oem_setup_env:

print "mkuser gogo ; ksh93 -c 'chpasswd <<<gogo:gogo'"  | oem_setup_env

Same from the HMC, if user has ViosAdminOp in his taskrole:

viosvrcmd -m  SYS -p VIO --admin -c  "mkuser gogo"
viosvrcmd -m  SYS -p VIO --admin -c  "ksh93 -c 'chpasswd <<<gogo:gogo'"