This article is to show examples of different commands to create users.
How to unix enabling existing users on the command line with vastool command.
How to create user and unix enable them at once.
Commands that can be used in scripts to create users.
RESOLUTION 1:
1 - Create a file with the users in it
more load_users.txt
john:passwd:1001:1000:John Doe:/home/john:/bin/bash
bob:passwd:1002:1000:Bob Doe:/home/bob:/bin/bash
sue:passwd:1003:1000:Sue Doe:/home/sue:/bin/bash
2 - Run the following command:
/opt/quest/bin/vastool -u administrator load -e -f /tmp/load_users.txt users
Assumptions for the command above:
1. The users bob, john and sue already exist in AD (if not, the command will fail. If you want to create new users, remove the "-e" flag)
2. [administrator] is an AD account that has rights to modify users
3. the file is called load_users.txt and is in your /tmp directory
4. The groups they are members of are already in AD (GID of 1000)-
5. The users UIDs (1001, 1002, 1003) are unique, and do not have conflicts in AD
You can get help by typing vastool load -h on the command line.
RESOLUTION 2:
1 - Use the vastool create command to unix enable the user.
For example to Unix-enable a user that already exists:
/opt/quest/bin/vastool
-u administrator create -e -i "jdoe:x:1001:1000:John Doe:/home/jdoe:/bin/bash" user jdoe
For more information about vastool commands, please refer to the vastool man page which is included with the product download as html page or from the client you can do the unix man command: man vastool
You can also get help by typing vastool create -h
RESOLUTION 3:
1 - Use the vastool user command to change the userAccountControl flag for a user that already exists. For example:
/opt/quest/bin/vastool -u administrator user enable testuser
Or you can set the 'Account is disabled' flag with:
/opt/quest/bin/vastool -u administrator user disable testuser
Note that the 'vastool user enable' or 'vastool user disable' commands do not Unix enable or disable a user (they just set the userAccountControl flag in Active directory)
For more information about vastool commands, please refer to the vastool man page which is included with the product download as html page or from the client you can do the unix man command: man vastool
You can also get help by typing vastool user -h
© 2024 One Identity LLC. ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center