Skip to content
Snippets Groups Projects
Unverified Commit 2d652250 authored by Laurent Modolo's avatar Laurent Modolo
Browse files

add SE Linux section

parent ab68aeba
No related branches found
No related tags found
No related merge requests found
......@@ -182,3 +182,65 @@ You can try again the `chown` command with the `sudo` command.
Check the content of the file `/etc/shadow` , what is the utility of this file (you can get help from the `man` command).
## Creating Users
You can add a new user to your system with the command `useradd`
```sh
useradd -m -s /bin/bash -g users -G adm,docker student
```
- `-m` create a hone directory
- `-s` specify the shell to use
- `-g` the default group
- `-G` the additional groups
To log into another account you can use the command `su`
What is the difference between the two following command ?
```sh
su student
```
```sh
sudo su student
```
What append when you don't specify a login with the `su` command ?
## Creating groups
You can add new groups to your system with the command `groupadd`
```sh
sudo groupadd dummy
```
Then you can add users to these group with the command `usermod`
```sh
sudo usermod -a -G dummy student
```
And check the result:
```sh
groups student
```
To remove an user from a group you can rewrite it's list of group with the command `usermod`
```sh
sudo usermod -G student student
```
Check the results.
## Security-Enhanced Linux
While what you have seen in this section hold true for every Unix system, additional rules can be applied to control the rights in Linux. This is what is called [SE Linux](https://en.wikipedia.org/wiki/Security-Enhanced_Linux) (**s**ecurity-**e**nhanced **Linux**)
When SE Linux is enabled on a system, every **process** can be assigned a set of right. This is how, on Android for example, some programs can access your GPS while other cannot, etc. In this case it's not the user rights that prevail, but the **process** launched by the user.
[To understand more about processes you can head to the next section.](https://http://perso.ens-lyon.fr/laurent.modolo/unix/6_unix_processes.html)
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment