Skip to content

Commit 54930b7

Browse files
mckaygerhardvotdev
andauthoredDec 14, 2024··
users and group docs improved with missing informatino fixed #138 (#139)
* Update users.rst reorganiza and improve right documentation * Update users.rst * group management documentation improved and completed the missing explanations * fix misctakes in group subsection, add missing information about groups * fix redundant information on homes and group technical details of user management * Make some adaptions Signed-off-by: Volker Theile <votdev@gmx.de> --------- Signed-off-by: Volker Theile <votdev@gmx.de> Co-authored-by: Volker Theile <votdev@gmx.de>
1 parent 1f61b6c commit 54930b7

File tree

1 file changed

+180
-66
lines changed

1 file changed

+180
-66
lines changed
 

‎administration/users.rst

+180-66
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,220 @@
11
Users
22
#####
33

4-
In this section you can create, edit and access information of |omv| users and groups.
4+
The user management in |omv| is provided by the user management of the
5+
operating system on which it is running.
6+
7+
However, |omv| also maintains control over these users, **so management is a team effort**
8+
between the Debian operating system and the internal database of |omv|.
9+
10+
Users that are managed via the |webui| are so-called *non-system users*.
11+
Their *UID* is in a specific range, usually from 1000 to 60000. The same applies
12+
to groups that are managed via the |webui|. Their *GID* is in a specific
13+
range, usually from 1000 to 60000. Check ``/etc/login.defs`` for more information.
14+
15+
The **Users** management section in the |webui| is divided into three
16+
subsections: ``Settings``, ``Users`` and ``Groups``.
17+
18+
Users can log into the |webui| to see their own profile information. The
19+
administrator can prohibit this behaviour for each user individually.
20+
21+
22+
Settings
23+
========
24+
25+
User home directory
26+
-------------------
27+
28+
Due to the nature explained, users are supposed to have their own private place for
29+
files that is called "*home*", depending on the type of service, automatically becomes
30+
a personal private shared location.
31+
32+
You can select a |sf| as root for the *home* directories of all non-system users.
33+
34+
If *User home directory* is disabled and a new user is created, the following happens:
35+
36+
* No home directory will be created and assigned to the user
37+
38+
If *User home directory* is enabled and a new user is created, the following happens:
39+
40+
* A home directory will be created in the selected |sf| and assigned to the user
41+
* The "skel" templates from Debian will applied to the new home directory
42+
43+
If *User home directory* is enabled, the following actions will be performed:
44+
45+
* The home directory path will be updated for all existing non-system users.
46+
* The previous home directory content will NOT be moved to the new location. This has to be done manually.
47+
48+
If *User home directory* is disabled, the following actions will be performed:
49+
50+
* The home directory will be unset for all existing non-system users.
51+
* The home directory content will NOT be deleted.
52+
553

654
User
755
====
856

9-
Here you can create or modify user information and configure the user home folders.
57+
This page lists all non-system users and allows you to *Create* or *Edit*
58+
those users as well as their |sf| *Permissions*. There is also a special
59+
option that allows you to *Import* multiple users at once.
1060

11-
Add
12-
^^^^
61+
Create
62+
------
1363

14-
Information
15-
The configuration panel gives you options to add, edit or remove users. The table displays all
16-
|omv| current users.
64+
The following form fields are available:
1765

18-
When a user is created |omv| backend executes :command:`useradd` in non-interactive
19-
mode with all the information passed from the form fields, this command also creates an
20-
entry in :file:`/etc/passwd`, a hashed password in :file:`/etc/shadow`. Samba service is watching any changes
21-
in users database section so it also sets the password in the Samba tdbsam storage backend.
66+
Name
67+
This must be only numbers and letters. Its the "username" of the login credentials
68+
and must be all lowercase to avoid confusion.
2269

23-
The mail field is used for cron jobs when the task is selected to run as
24-
specific user. By default users are created with :command:`/bin/nologin`
25-
shell, this will prevent local and remote console access.
70+
Password
71+
This field will provide the password of the user.
2672

27-
Group
28-
Add or remove users from specific groups. In Linux groups can be used to control
29-
access to certain features and also for permissions.
73+
Shell
74+
The shell is only used for remote access to interact with the server.
75+
By default the form will offers :command:`/usr/bin/sh` shell, but is recommended usage of
76+
the :command:`/usr/bin/nologin` shell to prevent local and remote console access.
3077

31-
Adding a user to the ``sudo`` group will give them root privileges, adding
32-
a user to ``saned`` will give access to scanners, etc. By default all users created using
33-
the |webui| are added to the ``users`` group (``gid=100``).
78+
Groups
79+
This field allows to add or remove users from specific groups. Groups are the means of access
80+
for multiple users to multiple shared resources.
3481

35-
Public Key
36-
Add or remove :doc:`public keys </administration/services/ssh>` for granting remote access for users.
82+
Some groups only affect the system (as of Linux), others are specific to the |omv| system.
83+
By default all users created using the |webui| are added to the ``users`` group (``gid=100``).
3784

38-
.. note::
85+
SSH public keys
86+
Add or remove :doc:`public SSH keys </administration/services/ssh>` for granting remote access for users.
87+
88+
Disallow account modification
89+
Disallow the user to modify their own account information.
90+
91+
Tags
92+
Specify tags to categorize the user.
3993

40-
- The user profile information (except password) is also stored in the internal |omv| database, along with the public keys.
41-
- The table shows information from internal database and also parses information from :file:`/etc/passwd` lines with a `UID` number higher than 1000. A user created in terminal is not in the internal database. This causes trouble with samba, as there is no user/password entry in the tdbsam file. Just click edit for the user, enter the same or new password, now the user has the linux and samba password synced.
42-
- A user can log into the |webui| to see their own profile information. Depending if the administrator has setup the username account to allow changes, they can change their password and mail account.
43-
- A non-privileged user can become a |webui| administrator by adding them to the ``openmediavault-admin`` group.
4494

4595
Import
46-
^^^^^^
96+
------
4797

48-
Designed for bulk user creation. Create a spreadsheet with the corresponding data as
49-
described in the import dialog window, save it as CSV (make sure the field separator is semicolon :code:`;`), then just
50-
simply::
98+
Designed for bulk user creation. The user data must be entered as CSV data.
99+
An example is prepared as a comment.
51100

52-
$ cat usersfile.csv
101+
Those fields are the same as the form of the *Create* user page.
53102

54-
Example outputs::
103+
The field of *UID* must be numeric and must be in the range from 1000 to 60000 (check ``/etc/login.defs`` for more information).
55104

56-
# <name>;<uid>;<tags>;<email>;<password>;<shell>;<group,group,...>;<disallowusermod>
57-
user1;1001;user1;user1@myserver.com;password1;/bin/bash;sudo;1
58-
user2;1002;user2;user2@my.com;password2;/bin/sh;;0
59-
user3;1003;user3;user3@example.com;password3;/bin/false;;1
60-
user4;1004;user4;user4@test.com;password4;;;1
105+
Example data::
61106

62-
.. note::
63-
- :file:`/etc/shells` will give you a list of valid shells.
64-
- The last field is a boolean for allowing the user to change their account.
107+
# <name>;<uid>;<tags>;<email>;<password>;<shell>;<group,group,...>;<disallowusermod>
108+
user1;1001;user1;user1@myserver.com;password1;/bin/bash;sudo;1
109+
user2;1002;user2;user2@my.com;password2;/bin/sh;;0
110+
user3;1003;user3;user3@example.com;password3;/bin/false;;1
111+
user4;1004;user4;user4@test.com;password4;;;1
112+
113+
Edit
114+
----
65115

66-
Paste the contents into the import dialog.
116+
Here you can modify the user information, the fields are the same as the form of the *Create* user page.
67117

68118
Permissions
69-
^^^^^^^^^^^
119+
-----------
70120

71-
The button opens a window that displays all current existing |sf| and their
72-
permissions for selected user from the table. How the permissions are stored is
73-
described further down in the :doc:`shared folder </administration/storage/sharedfolders>` section.
121+
All existing |sf| and the access rights of the user to be edited are displayed
122+
on this page. The following access rights are available:
74123

75-
Settings
76-
^^^^^^^^
124+
- Read/Write
125+
- Read-only
126+
- No access
127+
128+
These settings are used by the services to configure the access rights for the users.
129+
130+
.. note::
131+
132+
Please note that these settings have no effect on file system permissions.
133+
134+
How the permissions are stored is described further down in the :doc:`shared folder </administration/storage/sharedfolders>` section.
77135

78-
Option to select a |sf| as root for home folders for new users created in the
79-
|webui|. Previously existing users created before enabling this setting will not have
80-
their home folders moved to this new location. You can manually edit :file:`/etc/passwd`
81-
to point them to the new location. Also existing users data in default linux location :file:`/home`
82-
has to be moved manually.
83136

84137
Group
85138
=====
86139

140+
This page lists all non-system groups and allows you to *Create* or *Edit* those groups as well as their |sf| *Permissions*. There is also a special option that allows you to *Import* multiple groups at once.
141+
142+
87143
Add
88-
^^^
144+
---
89145

90-
Create groups and select the members. You can select current |omv| users
91-
and system accounts. Information is stored in ``config.xml`` and
92-
:file:`/etc/group`.
146+
The following form fields are available:
147+
148+
Name
149+
This must be only numbers and letters.
150+
151+
Members
152+
This field allows to add or remove users for this group.
93153

94154
Import
95-
^^^^^^
155+
------
156+
157+
Designed for bulk group creation. The group data must be entered as CSV data.
158+
An example is prepared as a comment.
159+
160+
Those fields are the same as the form of the *Create* group page.
96161

97-
Bulk import works in similar as user account import. Just a csv text,
98-
delimited with a semicolon :code:`;`. The dialog displays the necessary
99-
fields.
162+
The field of *GID* must be numeric and must be in the range from 1000 to 60000 (check ``/etc/login.defs`` for more information).
100163

101164
Edit
102-
^^^^
103-
Just to add or remove members from groups. Default groups created in the
104-
|webui| have a ``GID`` greater than ``1000``. Same as usernames, groups created
105-
in terminal are not stored in the internal database. Just edit, insert a
106-
comment and their information should now be stored in ``config.xml``.
165+
----
166+
167+
Here you can modify the group information, the fields are the same as the form of the *Create* group page.
168+
169+
Permissions
170+
-----------
171+
172+
All existing |sf| and the access rights of the group to be edited are displayed
173+
on this page. The following access rights are available:
174+
175+
- Read/Write
176+
- Read-only
177+
- No access
178+
179+
These settings are used by the services to configure the access rights for the groups.
180+
181+
.. note::
182+
183+
Please note that these settings have no effect on file system permissions.
184+
185+
How the permissions are stored is described further down in the :doc:`shared folder </administration/storage/sharedfolders>` section.
186+
187+
188+
Technical details
189+
=================
190+
191+
When a user is created |omv| backend executes :command:`useradd` in non-interactive
192+
mode with all the information passed from the form fields. This command is responsible for creating an
193+
entry in :file:`/etc/passwd` and a hashed password in :file:`/etc/shadow`.
194+
195+
The |omv| backend monitors all database changes to users to allow other services to react to these changes.
196+
This ensures, for example, that the *Samba* user database is updated when a user password is changed.
197+
198+
.. attention::
199+
200+
- The user profile information (except password) is also stored in the
201+
internal |omv| database, along with the public keys.
202+
- A non-privileged user can become a |webui| administrator by adding them
203+
to the ``openmediavault-admin`` group.
204+
205+
Manual management
206+
-----------------
207+
208+
If a user is created via the |webui|, no corresponding group with the name of the user is created.
209+
210+
A user created in terminal by the :command:`useradd` command will not be in the |omv| internal
211+
database. This causes trouble with some services, by example *Samba*, as there is no
212+
user/password entry in the ``tdbsam`` database of *Samba*.
213+
214+
To synchronize users or groups that have not been created in the |webui|, simply
215+
perform an *Edit* action and change the password or membership.
216+
217+
Shared home directories
218+
-----------------------
219+
220+
If *User Home directory* is enabled and configured properly, then the home directories can be shared by some services as well, e.g. *Samba* and *FTP*.

0 commit comments

Comments
 (0)
Please sign in to comment.