The sample script in the link below creates a home directory for each user that exists in the SAS Viya identities service with a uid and gid that matches what is in SAS Viya. This script can be helpful when you use an LDAP server that does not supply these values or SCIM, because SAS Viya generates them dynamically.
Here's the process that the script uses:
The following are required in order for the script to run:
The script has the following additional options:
--user Allows the login user ID to be specified during command execution instead of being prompted.
--password Allows the login password to be specified during command execution instead of being prompted.
--authcode Allows for logging in to SAS Viya with an Authorization Code instead of a User ID and Password.
--token Allows an oauth token to be provided directly rather than the script logging in to get one.
--useracct Allows for the specification of a single user instead of looping through all users.
--setown Pulls the identifiers for all users instead of only those without directories already present. It uses the chown command to change ownership values to those drawn from SAS Viya.
--reset-identifier Deletes the existing identifier for every user, causing it to be regenerated when it is next requested.
The hashing algorithm that generates IDs for users and groups changed at version 2023.06. The options --setown and --reset-identifier are useful in situations where the directories have already been created with the old IDs and SAS Viya now has new IDs for users (--setown) or SAS Viya needs to be triggered into regenerating these IDs using the new hashing algorithm (--reset-identifier). This issue could occur if a single home directory share is being used among multiple environments or tenants, and the IDs were generated for some tenants or environments with the old algorithm and others with the new algorithm.
To access the sample program, click the link above.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Type: | Sample |
Date Modified: | 2023-08-29 17:39:25 |
Date Created: | 2021-11-18 14:24:19 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
SAS System | SAS Viya | Linux for x64 | Viya |