Is there any way in which I can set the password for a newly created user account in AIX in a one line command?
I don't want to give any prompt to the user. If there is a command, it should set the password to that user without asking anything on the screen.
I need to use that command in another technology like Java/.Net. I need to create the accounts with password on a AIX machine at run time by executing one line of code where I can pass parameters.
Suppose a user is giving a username in the text box of a Java application and in the background the command needs to be executed which will create the user accounts(with the password) at a remote AIX server. I am successful to add a user account, but setting the password is something where I am stuck.
How to set password for users in AIX using single line command
aixpassworduseradd
Best Answer
You can use
chpasswd
Example 1:
Example 2:
Also for security you can pass encrypted password to
chpasswd