Sunday, June 17, 2007

Add a User Account via passmgmt

You can use admintool and useradd utilities to add user accounts. But there is another utility called passmgmt that will perform a similar function. However, it will not create a home directory. You will have to do that manually. Here's an example.

# passmgmt -a -c "esofthub account" -h /export/home/esofthub -u 1006 -g 10 -s /bin/csh esofthub
# pwck
esofthub:x:1006:10:esofthub account:/export/home/esofthub:/bin/csh
Login directory not found

# mkdir -p /export/home/esofthub
# chown -R esofthub:staff /export/home/esofthub
# pwck esofthub
# passwd esofthub
New password:
Re-enter new password:
passwd (SYSTEM): passwd successfully changed for esofthub
# su - esofthub
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001

No comments: