Assigning a Login Policy When Creating a New User

If you do not assign a login policy when creating a user account, the account is assigned the root login policy.

Prerequisites
The MANAGE ANY LOGIN POLICY system privilege.
Task
Assign a login policy other than the root login policy when creating a new user. A user can be assigned only one login policy at a time.
Execute:
CREATE USER userID
[ IDENTIFIED BY password ]
[ LOGIN POLICY policy-name ]
Note: You cannot specify multiple user IDs in the same CREATE USER command when assigning a login policy to users.

Example:

This statement creates a user called Joe with the password welcome, and assigns the login policy Test2:

CREATE USER Joe
IDENTIFIED BY welcome
LOGIN POLICY Test2
Related reference
Login Policy Options
ALTER LOGIN POLICY Statement
CREATE LOGIN POLICY Statement