Originally Posted by firstname.lastname@example.org
Is there any way I can create user and set its passwd in a single line in AIX. I'm able to do this in Linux(RHEL) but want to replicate the same in AIX.
$useradd -c 'firstnam lastname' -g group1 -n -s /bin/ksh id1234; echo id1234password | passwd id1234 --stdin
I have tried the following but doesn't seem to work:
$mkuser pgrp='group1' gecos='firstname lastname' id1234 ; echo idpassword |passwd id1234 --stdin
Take a look at the chpasswd command. Try doing something like:
echo "id1234:id1234password" | /bin/chpasswd -c
There is also an AIX forum here, since this really isn't a Linux question, which may get you AIX answers faster next time.