Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
04-linux:10-administration:88-users [2016/11/16 00:46] – [Utilisateurs] Roge | 04-linux:10-administration:88-users [2023/03/05 02:15] (Version actuelle) – [Partage dossier entre utilisateurs] Roge | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== |
Ligne 80: | Ligne 80: | ||
'' | '' | ||
- | * Définition des groupes d'un utilisateur : | ||
- | ''sudo usermod -a -G // | + | * Changement du groupe **primaire** d'un utilisateur |
+ | '' | ||
+ | |||
+ | * Ajout d'un utilisateur à un groupe (groupe secondaire de l' | ||
+ | |||
+ | '' | ||
+ | |||
+ | |||
<note warning> | <note warning> | ||
If the //**-a**// option is omitted in the usermod command above, the user is removed from all groups not listed in additional_groups (i.e. the user will be member only of those groups listed in additional_groups). | If the //**-a**// option is omitted in the usermod command above, the user is removed from all groups not listed in additional_groups (i.e. the user will be member only of those groups listed in additional_groups). | ||
Ligne 95: | Ligne 101: | ||
+ | ===== Partage dossier entre utilisateurs ===== | ||
+ | |||
+ | < | ||
+ | sudo mkdir / | ||
+ | |||
+ | sudo / | ||
+ | |||
+ | sudo chown -R root.share / | ||
+ | |||
+ | sudo / | ||
+ | |||
+ | sudo chmod ug+rwx -R / | ||
+ | |||
+ | # set the SGID bit on the shared directory. Normally whenever you create files in a directory, by default it belongs to the default group or user. When a file is created in a directory with the SGID bit set it belongs to the same group as the directory. The result being that all users of the “share” group can create/ | ||
+ | |||
+ | sudo chmod g+s / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Sudoers ===== | ||
+ | |||
+ | |||
+ | remove user from sudoers group | ||
+ | '' |