From c61ed984a64e624d8cfa9b12c12ba60ea3608170 Mon Sep 17 00:00:00 2001 From: ivuorinen Date: Thu, 24 Oct 2024 00:17:29 +0000 Subject: [PATCH] Update cheatsheets --- tldr/linux/aa-disable | 2 +- tldr/linux/aa-enforce | 4 ++-- tldr/linux/useradd | 12 ++++++------ tldr/linux/userdel | 4 ++-- tldr/linux/usermod | 10 +++++----- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/tldr/linux/aa-disable b/tldr/linux/aa-disable index 216915ee..bf7e17b2 100644 --- a/tldr/linux/aa-disable +++ b/tldr/linux/aa-disable @@ -13,6 +13,6 @@ source: https://github.com/tldr-pages/tldr.git `sudo aa-disable {{path/to/profile1 path/to/profile2 ...}}` -- Disable profiles (defaults to `/etc/apparmor.d`): +- Disable profiles in a directory (defaults to `/etc/apparmor.d`): `sudo aa-disable --dir {{path/to/profiles}}` diff --git a/tldr/linux/aa-enforce b/tldr/linux/aa-enforce index a45aeca5..8d3b4aed 100644 --- a/tldr/linux/aa-enforce +++ b/tldr/linux/aa-enforce @@ -11,8 +11,8 @@ source: https://github.com/tldr-pages/tldr.git - Enable profile: -`sudo aa-enforce {{path/to/profile1 path/to/profile2 ...}}` +`sudo aa-enforce --dir {{path/to/profile}}` - Enable profiles: -`sudo aa-enforce --dir {{path/to/profile}}` +`sudo aa-enforce {{path/to/profile1 path/to/profile2 ...}}` diff --git a/tldr/linux/useradd b/tldr/linux/useradd index f2b1b458..6041f47f 100644 --- a/tldr/linux/useradd +++ b/tldr/linux/useradd @@ -15,24 +15,24 @@ source: https://github.com/tldr-pages/tldr.git - Create a new user with the specified user ID: -`sudo useradd --uid {{id}} {{username}}` +`sudo useradd {{-u|--uid}} {{id}} {{username}}` - Create a new user with the specified shell: -`sudo useradd --shell {{path/to/shell}} {{username}}` +`sudo useradd {{-s|--shell}} {{path/to/shell}} {{username}}` - Create a new user belonging to additional groups (mind the lack of whitespace): -`sudo useradd --groups {{group1,group2,...}} {{username}}` +`sudo useradd {{-G|--groups}} {{group1,group2,...}} {{username}}` - Create a new user with the default home directory: -`sudo useradd --create-home {{username}}` +`sudo useradd {{-m|--create-home}} {{username}}` - Create a new user with the home directory filled by template directory files: -`sudo useradd --skel {{path/to/template_directory}} --create-home {{username}}` +`sudo useradd {{-k|--skel}} {{path/to/template_directory}} {{-m|--create-home}} {{username}}` - Create a new system user without the home directory: -`sudo useradd --system {{username}}` +`sudo useradd {{-r|--system}} {{username}}` diff --git a/tldr/linux/userdel b/tldr/linux/userdel index b47c2c22..5031cf0f 100644 --- a/tldr/linux/userdel +++ b/tldr/linux/userdel @@ -15,8 +15,8 @@ source: https://github.com/tldr-pages/tldr.git - Remove a user in other root directory: -`sudo userdel --root {{path/to/other/root}} {{username}}` +`sudo userdel {{-R|--root}} {{path/to/other/root}} {{username}}` - Remove a user along with the home directory and mail spool: -`sudo userdel --remove {{username}}` +`sudo userdel {{-r|--remove}} {{username}}` diff --git a/tldr/linux/usermod b/tldr/linux/usermod index 737c9e53..ade67b2f 100644 --- a/tldr/linux/usermod +++ b/tldr/linux/usermod @@ -11,20 +11,20 @@ source: https://github.com/tldr-pages/tldr.git - Change a username: -`sudo usermod --login {{new_username}} {{username}}` +`sudo usermod {{-l|--login}} {{new_username}} {{username}}` - Change a user ID: -`sudo usermod --uid {{id}} {{username}}` +`sudo usermod {{-u|--uid}} {{id}} {{username}}` - Change a user shell: -`sudo usermod --shell {{path/to/shell}} {{username}}` +`sudo usermod {{-s|--shell}} {{path/to/shell}} {{username}}` - Add a user to supplementary groups (mind the lack of whitespace): -`sudo usermod --append --groups {{group1,group2,...}} {{username}}` +`sudo usermod {{-a|--append}} {{-G|--groups}} {{group1,group2,...}} {{username}}` - Change a user home directory: -`sudo usermod --move-home --home {{path/to/new_home}} {{username}}` +`sudo usermod {{-m|--move-home}} {{-d|--home}} {{path/to/new_home}} {{username}}`