You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/beginners/README.md
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,12 @@
1
1
---
2
-
title: 'Beginner series'
2
+
title: "Beginner series"
3
3
---
4
4
5
-
6
5
# Beginner Series!
7
6
8
-
Numerous new users come to Linux every day, and using AlmaLinux for the first time should be a straightforward experience. This series takes the time to explain base-level concepts in a simple language, providing a reassuring guide for new users so they won't feel immediately overwhelmed. Here is how to manage common issues using AlmaLinux:
7
+
Numerous new users come to Linux every day, and using AlmaLinux for the first time should be a straightforward experience. This series takes the time to explain base-level concepts in a simple language, providing a reassuring guide for new users so they won't feel immediately overwhelmed. Here is how to manage common issues using AlmaLinux:
9
8
10
-
-[File and Folder Permissions](/beginners/file-and-folder-permissions/)
9
+
-[File and Folder Permissions](/beginners/file-and-folder-permissions/)
11
10
-[User and Group Management](/beginners/users-and-groups/)
Copy file name to clipboardExpand all lines: docs/beginners/file-and-folder-permissions.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,22 +12,22 @@ And because Linux is a multi-user operating system, file and folder permissions
12
12
13
13
There are two different methods for changing folder and file permissions on Linux:
14
14
15
-
-absolute - which requires users to know the numeric number associated with each permission.
16
-
-symbolic - which only requires the use of letters associated with users (user, group, and other) and permissions (such as read, write, and execute).
15
+
- absolute - which requires users to know the numeric number associated with each permission.
16
+
- symbolic - which only requires the use of letters associated with users (user, group, and other) and permissions (such as read, write, and execute).
17
17
18
18
## Key Takeaways
19
19
20
20
To understand file and folder permission, there are three different types of owners:
21
21
22
-
-User - the user who is the primary owner of a file or folder.
23
-
-Group - any user who's part of a group with access to a file or folder.
24
-
-Other - anyone with access to the system.
22
+
- User - the user who is the primary owner of a file or folder.
23
+
- Group - any user who's part of a group with access to a file or folder.
24
+
- Other - anyone with access to the system.
25
25
26
26
There are also three different types of permissions:
27
27
28
-
-Read - a user can view and/or copy the contents of a file.
29
-
-Write - a user can modify the contents of a file.
30
-
-Execute - a user can run the file (if it's an executable app or script).
28
+
- Read - a user can view and/or copy the contents of a file.
29
+
- Write - a user can modify the contents of a file.
30
+
- Execute - a user can run the file (if it's an executable app or script).
31
31
32
32
The above permissions hold true for both files and folders.
33
33
@@ -37,20 +37,20 @@ If you issue the command ls -l within a directory, you'll see all of your files/
37
37
38
38
Here's the breakdown of that listing:
39
39
40
-
*-- the file type
41
-
* rw-rw-r-- - the permissions
42
-
* 1 - number of hard links
43
-
* jack - owner
44
-
* jack - group
45
-
* 0 - file size
46
-
* July 16 13:04 - modification timestamp
47
-
* testfile - the filename
40
+
--- the file type
41
+
- rw-rw-r-- - the permissions
42
+
- 1 - number of hard links
43
+
- jack - owner
44
+
- jack - group
45
+
- 0 - file size
46
+
- July 16 13:04 - modification timestamp
47
+
- testfile - the filename
48
48
49
49
What we want to focus on is the permissions. In our example that's `rw-rw-r--`. How this breaks down is simple. The permissions section is broken into three sections: owner, group, and other, each of which can have read (r), write (w), and/or execute (x) permissions. So our example breaks down like this:
50
50
51
-
-owner has read and write permissions.
52
-
-group has read and write permissions.
53
-
-other has read permissions.
51
+
- owner has read and write permissions.
52
+
- group has read and write permissions.
53
+
- other has read permissions.
54
54
55
55
If you see a `-` character, it means there are no permissions set for that. If the file had full permissions for all users, it would look like this:
56
56
@@ -60,10 +60,10 @@ So, `rwx` for owner, `rwx` for group, and `rwx` for other.
60
60
61
61
The question now is, how do we change that? With the chmod command, which has two different modes: absolute and symbolic. The easiest method is symbolic. Why? With absolute mode, you have to remember the following:
62
62
63
-
-read permission = 4
64
-
-write permission = 2
65
-
-execute permission = 1
66
-
-no permission = 0
63
+
- read permission = 4
64
+
- write permission = 2
65
+
- execute permission = 1
66
+
- no permission = 0
67
67
68
68
To change the permission in absolute mode, you add the permissions you want for each group. For example, if you want owner to have `rwx` permission, the total is 7. If you wanted group to have read and write permission, the total is 6, if you wanted to give other only read permission, the total is 4. String them together and you get 764. To make that change, the command would be:
Copy file name to clipboardExpand all lines: docs/beginners/users-and-groups.md
+11-9Lines changed: 11 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
---
2
2
title: "User and group management via the command line and GUI"
3
3
---
4
+
4
5
<hr>
5
6
6
-
| 💡 | Experience Level | ⭐☆☆☆☆ |
7
-
|--- | --------- | --------|
7
+
| 💡 | Experience Level | ⭐☆☆☆☆ |
8
+
| --- | ---------------- | ------ |
9
+
8
10
###### last updated: 2024-09-10
9
11
10
12
## Introduction
@@ -18,8 +20,8 @@ Fortunately, the open-source operating system has everything you need built righ
18
20
19
21
Users and groups can be managed in two ways:
20
22
21
-
-The command line interface (CLI)
22
-
-The desktop graphical user interface (GUI)
23
+
- The command line interface (CLI)
24
+
- The desktop graphical user interface (GUI)
23
25
24
26
Which option you use will depend on the access you have to the machine in question and whether or not you prefer the terminal or a GUI.
25
27
@@ -47,10 +49,10 @@ The -e option is used to automatically expire a user's password. This way, the f
47
49
48
50
There are other tasks you can undertake to manage users from the command line, such as:
49
51
50
-
-Lock a user account - `sudo passwd -l USERNAME`
51
-
-Unlock a user account - `sudo passwd -u USERNAME`
52
-
-Delete a user account - `sudo userdel USERNAME`
53
-
-Delete a user and their home directory - `sudo userdel -r USERNAME`
52
+
- Lock a user account - `sudo passwd -l USERNAME`
53
+
- Unlock a user account - `sudo passwd -u USERNAME`
54
+
- Delete a user account - `sudo userdel USERNAME`
55
+
- Delete a user and their home directory - `sudo userdel -r USERNAME`
54
56
55
57
### Managing users from the GUI
56
58
@@ -101,4 +103,4 @@ Where `GROUPNAME` is the group to be removed and `USERNAME` is the username.
101
103
102
104
Remember, any time you create a new user, you should immediately expire their password, so the user can set one themselves.
103
105
104
-
And that's the basics of user and group management in Linux. There's a lot more to learn, so we would recommend viewing the man pages for each command listed here (such as `man adduser`, `man groupadd`, and `man usermod`).
106
+
And that's the basics of user and group management in Linux. There's a lot more to learn, so we would recommend viewing the man pages for each command listed here (such as `man adduser`, `man groupadd`, and `man usermod`).
0 commit comments