[201] Start improving the lab sheet
All checks were successful
continuous-integration/laminar-elessar Build 71 succeeded in 1 minute 39 seconds .
All checks were successful
continuous-integration/laminar-elessar Build 71 succeeded in 1 minute 39 seconds .
This commit is contained in:
parent
fc2e5133f8
commit
f40245d004
1 changed files with 18 additions and 9 deletions
|
@ -98,24 +98,33 @@ sudo reboot
|
|||
|
||||
This is because root can be used, even accidentally to damage or destroy the system because of its extensive permissions. Having separate accounts, such as "yourusername" also increases accountability and decreases the likelihood of system damage.
|
||||
|
||||
Normally, this is handled by your operating system installer, so you shouldn't need to create a new account manually here. If you'd like to rename the default user account here, this is how you'd do it.
|
||||
|
||||
- Creating a non-root account:
|
||||
_This section is optional. If you'd prefer, you can skip this section and move on to the next section, [setting your password](#setting-your-password)._
|
||||
|
||||
`adduser "yourusername" `
|
||||
To create a new non-root account, do the following:
|
||||
|
||||
We should create the new user as root.
|
||||
`sudo adduser "yourusername"`
|
||||
|
||||
Execute the command as above, replacing `"yourusername"` with a desired username.
|
||||
We should create the new user as root, so don't forget to prefix it with `sudo` (though if you're already logged in as root, there's no need for `sudo`. You can tell if you're logged in as root by the last character in the prompt: if it's a dollar `$` then you're a regular user and need to use `sudo`, if it's a hash `#` then you're the root user).
|
||||
|
||||
During the setup, you may be asked for a password along with other information. You may customise this information as you wish.
|
||||
Execute the command as above, replacing `"yourusername"` with a desired username.
|
||||
|
||||
`usermod -aG sudo yourusername`
|
||||
During the setup, you may be asked for a password along with other information. You may customise this information as you wish.
|
||||
|
||||
Now that the user has been created, we should ensure that that user can execute commands with escalated permissions. These are called `sudo` permissons.
|
||||
Now that the user has been created, we should ensure that that user can execute commands with escalated permissions - i.e. as the `root` account. These are called `sudo` permissions. These can be assigned to your new account like this:
|
||||
|
||||
Execute the command as above, replacing `"yourusername"` with the user created in the previous step.
|
||||
`sudo usermod -aG sudo yourusername`
|
||||
|
||||
- The Linux security model: Knowing why you're typing your password
|
||||
Execute the command as above, replacing `"yourusername"` with the user you created in the previous step.
|
||||
|
||||
At this point, you should be able to logout and log back in as the new user account you've just created - you should do this now.
|
||||
|
||||
If you're creating a new account to replace the default non-root user account, it's a good idea at this point to delete the old default user account now. This helps ensure that
|
||||
|
||||
The Linux security model: Knowing why you're typing your password
|
||||
|
||||
### Setting your password
|
||||
|
||||
### Securing SSH
|
||||
Used by servers and their administrators across the world to talk to one another, if someone manages to get in who isn't supposed to, they could do all kinds of damage!
|
||||
|
|
Loading…
Reference in a new issue