Enter the following sysconfig create-profile command with the users grouping to generate a valid profile that configures the root user and initial user.
# sysconfig create-profile -g users -o sc_users.xml
The svc:/system/config-user SMF service configures user and root accounts. This service recognizes two property groups:
The root_account property group includes SMF properties that configure the root account.
The user_account property group includes SMF properties that configure user accounts.
The root_account property group contains the properties listed in the following table.
|
<service name="system/config-user" version="1" type="service">
<instance name="default" enabled="true">
<property_group name="root_account" type="application">
<propval name="password" value="encrypted_password"/>
<propval name="type" value="normal"/>
<propval name="expire" value="0"/>
</property_group>
</instance>
</service>
This section includes the following information:
Creating a User Account Without Depending on the Automounter
By default, when initial user accounts are created, the home directories are managed by the automounter and accessed under /home/login directories. To create initial user accounts without depending on the automounter, set the user_account/autohome property to the empty string ("") in the system configuration profile.
Setting the user_account/autohome property to the empty string has the following effects:
The home directory entry in the /etc/passwd file is set to the mount point of the home ZFS dataset, not to /home/login. The default mount point of the home ZFS dataset is /export/home/login.
No mapping entry is added to the /etc/auto_home file.
The user_account property group contains the properties listed in the following table.
|
To configure multiple users on the newly-installed system, specify the users by using the useradd command in a script. Then use a run-once SMF service to run the script at first boot. See Chapter 13, Running a Custom Script During First Boot for instructions.
The ssh_public_keys property group holds pre-generated ssh keys. The keys will be written to the users $HOME/ .ssh/authorized_keys file when the client is configured.
Example 11-2 Configuring SSH Keys
<property_group name="user_account" type="application">
<...>
<property type="astring" name="ssh_public_keys">
<astring_list>
<value_node value='[<options>] <key-type> <base64-encoding-key> [<comment>]'
<value_node value='[<options>] <key-type> <base64-encoding-key> [<comment>]'
</astring_list>
</property>
</property_group>