New answers tagged useradd
Leave the password field blank. newusers will complain repeatedly about 'No password supplied' and being unable to change the password, but the users will be created with ! (i.e. invalid password) in the shadow password field. username::1002:1002::/home/username:/bin/bash instead of: username:*:1002:1002::/home/username:/bin/bash For example: # echo ...
After adding your batch of users, you can unlock each user with the following command: usermod -p <username> '*'
You can give useradd the -r or --system flags to tell it you want such a user (a system user as you already called it). Here's an excerpt from my system's man page: -r, --system Create a system account. System users will be created with no aging information in /etc/shadow, and their numeric identifiers are choosen in the ...
You add the users the same way as the normal ones. Just make their shell path /sbin/nologin and you're okay. Read up on the useradd manual for more info: $ man useradd
You should use option -m to create the home dir when doing useradd. -d ... is only to override the default name for the home dir, which is the same as the one you actually gave. You need to chown name:name /home/name for each name now to recover. -m is useful as it also copies some standard files into the home dir.
From your overall description you are missing one step. What you have is: Create RBAC profile /etc/security/prof_attr Create Command allowed for the profile /etc/security/exec_attr Create role account and assign the profile to it. roleadd -s /usr/bin/pfksh -P "Created Profile" roleA && passwd roleA Create the the user account and assign role to it. ...
Top 50 recent answers are included