Skip to content

Commit

Permalink
WIP: update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
joseivanlopez committed Sep 20, 2021
1 parent 18b785c commit db940da
Showing 1 changed file with 70 additions and 32 deletions.
102 changes: 70 additions & 32 deletions doc/attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,39 @@ The YaST UI for creating and editing a user offers the following attributes:

| UI Field | Y2Users attr | Only when adding | Only when editing | Description |
| :--- | :--- | :--- | :--- | :--- |
| full name | gecos | | | |
| name | name | | | |
| password | password | | | |
| system mail | receive_system_mail | | | See `MailAliases` module |
| full name | `#gecos` | | | |
| name | `#name` | | | |
| password | `#password` | | | |
| system mail | `#receive_system_mail` | | | See `MailAliases` module |
| disable login | * password starting by `!` | | | |
| uid | uid | | | |
| home dir | home | | | | |
| home dir permission | umask | yes | | `useradd -K UMASK=666` |
| empty home | | yes | | `rm -rf` after creating. No way to ignore `/usr/etc/skel` |
| Move to new location | | | yes | |
| Btrfs subvolume | btrfs_subvolume_home | | | |
| Additional info | gecos | | | |
| login shell | shell | | | |
| group | primary_group | | | |
| additional groups | groups | | | |
| ssh public keys | authorized_keys | | | |

### Home management
| uid | `#uid` | | | |
| home dir | `Home#path` | | | | |
| home dir permission | `Home#create_mode` | yes | | `useradd -K HOME_MODE=755` |
| empty home | `Home#create_with_content` | yes | | `rm -rf` after creating. No way to ignore `/usr/etc/skel` |
| Move to new location | `Home#move_content` | | yes | |
| Btrfs subvolume | `Home#create_as_btrfs_subvol` | | | |
| Additional info | `#gecos` | | | |
| login shell | `#shell` | | | |
| group | `#primary_group` | | | |
| additional groups | `#groups` | | | |
| ssh public keys | `#authorized_keys` | | | |


## Password

The YaST UI for creating and editing a user offers the following attributes for the password:

| UI Field | Y2Users attr | Only when adding | Only when editing | Description |
| :--- | :--- | :--- | :--- | :--- |
| force change | aging == 0 | | | |
| days to warning | warning_period | | | |
| days usable after expiration | inactivity_period | | | |
| max days same password | maximum_age | | | |
| min days same password | minimum_age | | | |
| expiration date | account_expiration | | | |


## Home management

This section describes how the YaST users client behaves when dealing with the user home.

Expand All @@ -51,18 +66,41 @@ This section describes how the YaST users client behaves when dealing with the u

#### Deleting a user

* The home is removed too.


## Password

The YaST UI for creating and editing a user offers the following attributes for the password:

| UI Field | Y2Users attr | Only when adding | Only when editing | Description |
| :--- | :--- | :--- | :--- | :--- |
| force change | aging == 0 | | | |
| days to warning | warning_period | | | |
| days usable after expiration | inactivity_period | | | |
| max days same password | maximum_age | | | |
| min days same password | minimum_age | | | |
| expiration date | account_expiration | | | |
* The user is asked whether to keep or remove home.

#### Home representation in `Y2Users`

WIP

~~~
Y2Users::Home
#path
#create_on_disk
#create_as_btrfs_subvol
#create_mode
#create_with_content
#move_content
#keep_old
~~~

* Use cases
* create a new user with a home (`home#path` is not empty)
* with/without home on disk (`home#create_on_disk`)
* with/without content (`home#create_with_content`)
* as dir/subvolume (`home#create_as_btrfs_subvol`)
* with custom permissions (`home#create_mode`)
* create a new user without a home (`home#path` is empty)
* edit a user and add a home (`home#path` is not empty anymore)
* should we use *mkhomedir_helper* ?
* with/without home on disk (`home#create_on_disk`)
* with/without content (`home#create_with_content`)
* `home#create_as_btrfs_subvol` does not apply (see *mkhomedir_helper*)
* `home#create_mode` does not apply (see *mkhomedir_helper*)
* edit a user and change the home (`home#path` changes)
* with/without home on disk (`home#create_on_disk`)
* with/without content (`home#create_with_content`)
* `home#create_as_btrfs_subvol` does not apply (see *usermod*)
* `home#create_mode` does not apply (see *usermod*)
* keep/remove old home (`home#keep_old`)
* delete a user
* keep/remove old home (`home#keep_old` ?)

0 comments on commit db940da

Please sign in to comment.