- Administering Oracle Identity Cloud Service
- Manage Oracle Identity Cloud Service Components
- Manage Linux Authentication using the Linux-PAM Module
- Configure Groups and Users for the Linux-PAM
- Create a User with POSIX Attributes and Add to Group
Create a User with POSIX Attributes and Add to Group
Create a user with POSIX attributes and add the user to the group previously created.
- Create a
user.jsonfile with the following request body:user.json{ "password": "Securepasswd@1", "userName": "userPosix", "Name.givenName": "user", "Name.familyName": "Posix", "userType": "Employee", "emails": [ { "value": "user.posix@example.com", "type": "work", "primary": true }, { "value": "posix@example.com", "type": "home" } ], "addresses": [ { "type": "work", "primary": true, "streetAddress": "401 Island Parkway", "locality": "Redwood Shores", "region": "California", "postalCode": "94065", "country": "US", "formatted": "userPosix" } ], "urn:ietf:params:scim:schemas:oracle:idcs:extension:posix:User": { "homeDirectory": "/home/userPosix", "loginShell": "/bin/bash", "gecos": "userPosix 24855", "uidNumber": 12001, "gidNumber": 11010 }, "meta": { "resourceType": "User" }, "schemas": [ "urn:ietf:params:scim:schemas:core:2.0:User", "urn:ietf:params:scim:schemas:oracle:idcs:extension:posix:User" ] }where:
userNameis set to the username of the user you wish to createhomeDirectoryis set to the location of the user's home directoryloginShellis set to the default shellgecosis set to general information about the user, for example the user's username and phone numberuidNumbermust be set to a unique user id (uid) number in Linux. Use thegetent passwdcommand on Linux to see existing users and their uid'sgidNumbermust be set to the group id (gid) number created previously
- Run the following curl command to create the user and add it to the group:
user.jsoncurl -k -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <token-string>" "https://identity-cloud-service-instance-url/admin/v1/Users" -d '@user.json'where:
token-stringis the OAuth access token that you obtainedidentity-cloud-service-instance-urlis your Oracle Identity Cloud Service Instance URL
Note:
It is not possible to create a user with POSIX attributes using the Oracle Identity Cloud Service Administration Console.Once the user is created, the user will be sent a notification email to activate their account and set a new password. The user must activate their account before testing authentication in Linux.