Skip to main content

Load local UNIX groups from a URI

Contributors

As an alternative to manually creating individual local UNIX groups, you can load a list of local UNIX groups into SVMs from a uniform resource identifier (URI) by using the vserver services name-service unix-group load-from-uri command.

Steps
  1. Create a file containing the list of local UNIX groups you want to load.

    The file must contain group information in the UNIX /etc/group format:

    group_name: password: group_ID: comma_separated_list_of_users

    The command discards the value of the password field.

    The maximum supported file size is 1 MB.

    The maximum length of each line in the group file is 32,768 characters.

  2. Verify that the list does not contain any duplicate information.

    The list must not contain duplicate entries, or else loading the list fails. If there are entries already present in the SVM, you must either set the -overwrite parameter to true to overwrite all existing entries with the new file, or ensure that the new file does not contain any entries that duplicate existing entries.

  3. Copy the file to a server.

    The server must be reachable by the storage system over HTTP, HTTPS, FTP, or FTPS.

  4. Determine what the URI for the file is.

    The URI is the address you provide to the storage system to indicate where the file is located.

  5. Load the file containing the list of local UNIX groups into the SVM from the URI:

    vserver services name-service unix-group load-from-uri -vserver vserver_name -uri {ftp|http|ftps|https}://uri -overwrite {true|false}

    -overwrite {true|false} specifies whether to overwrite entries. The default is false. If you specify this parameter as true, ONTAP replaces the entire existing local UNIX group database of the specified SVM with the entries from the file you are loading.

Example

The following command loads a list of local UNIX groups from the URI ftp://ftp.example.com/group into the SVM named vs1. Existing groups on the SVM are not overwritten by information from the URI.

vs1::> vserver services name-service unix-group load-from-uri -vserver vs1
-uri ftp://ftp.example.com/group -overwrite false