************************************************************************

    About structure of /admin/conf/.passwd, /admin/conf/.shadow and
        /admin/conf/.groups when they are in 2 and 3 files

************************************************************************

Structure of .passwd came from structure fo normal *NIX passfile
/etc/passwd and have similarities with them.

************************************************************************

Let's see .passwd on examples:

*NIX
name:x:0:0:user_name:/home_dir:/bin/bash

this app
name:500:500:1:User_name:/:

Similarities:
First on both is login name.
Third on *NIX and second on this app is user ID.
Fourth on *NIX and third on this app is group ID.
Fifth on both is user normal name.
Sixth on both is user home directory.

Differences:
Fourth on this soft is user classification (how much he can did with
this app).
This app doesn't contain shell name (it doesn't need them).
Colon in the end is necessity for eliminate problems with different,
system-based line endings

Example in file:
someone:504:504:Somebody:foo/:

************************************************************************

Structure of .shadow also came from it's *NIX opposite and also have
similarities.

************************************************************************

Let's see .shadow on example

*NIX
name:*crypted_pass*:5:0:99999:7:::

this app
name:*crypted_pass*:0:7:99999:*cert_salt*:*public_certificate*:

Similarities:
First on both is login name.
Second on both is encrypted password.
Third on both is days of last date of change.

Differences:
Fourth in this soft is date of password expiration.
This app also can have key and salt for verification via certificates - fifth and sixth.

Colon at the end is necessity for eliminate problems with different,
system-based line endings.

Example in file:
someone:B02D18C041A6=:1123587930:1143587930:$dfg$:0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF:

************************************************************************

************************************************************************

Structure of .groups also cames from it's *NIX opposite and also have
similarities.

************************************************************************

Let's see .groups on example

*NIX
name:*crypted_pass*:0:who

this app
0:500:name:desc:

Similarities:
First on *NIX and third on this app is group name.
Third on *NIX and first on this app is group ID.

Differences:
Second on this app is ID of group creator.
Fourth on this app is group description.
This app doesn't need password for groups -> you must be member of
higher group and author of edited one for making changes.
Colon at the end is necessity for eliminate problems with different,
system-based line endings

Example in file:
3:504:anyone:Anyone:

************************************************************************

About Classification of users

All users has classification for their actions with this app. It is
strictly sorted kinds of actions to do.
Someone could add modules, change site properties or themes, but
couldn't access to another user's dir and change content of files.
Another one could edit structure and files of site root and content
of other user files or add styles of theme. But he couldn't change
templates, themes, used languages...
Last one could edit his files and structure. He couldn't edit templates,
themes, languages, only choose from pre-installed.
First one is site admin. He has classification 1. Second is superuser
(he must know what he did). He has classification 2. Third is normal
user. He has classification 3. It is possible has more than one
superuser but never more than one admin (make error - corrupted passwd
file - someone try to hack site).

************************************************************************

Which could call error?

- more than one admin
- more than one using of user ID
- free line before end of file
- content belie to expected format

All errors need action of admin with FTP or SSH access and manual edit



Kalanis 2021
GNU/GPLv2 && CC-BY-3.0
