Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Linux presentation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
asztrikx
Linux presentation
Commits
a9f3da62
Commit
a9f3da62
authored
3 years ago
by
Fodor Patrik
Browse files
Options
Downloads
Patches
Plain Diff
apróbb javítások megint
parent
5b855a23
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
második videó.md
+81
-10
81 additions, 10 deletions
második videó.md
with
81 additions
and
10 deletions
második videó.md
+
81
−
10
View file @
a9f3da62
...
...
@@ -14,6 +14,8 @@ vonatkozik a UNIX-ra és a Linux-ra is.
Vannak különböző
[
elvek
](
https://en.wikipedia.org/wiki/Unix_philosophy
)
, amik alapján egy UNIX operációs rendszert megalkotnak.
A Linux is ezen elvek alapján készült.
Ezen elvek közül néhány:
-
Moduláris szemlélet figyelembe vétele
-
Válaszd szét a működést az előírásoktól, szabályzatoktól
-
Egy program legyen kicsi, egyszerű, átlátható, mégis robosztus
...
...
@@ -101,8 +103,7 @@ https://linuxhint.com/ubuntu-user-management/
### Felhasználók kezelése
#### Létrehozás
A
`useradd`
parancs segítségével
hozzáadhatunk egy új felhasználót a rendszerhez.
A
`useradd`
parancs segítségével hozhatunk létre új felhasználót.
`sudo useradd -G kszksok -s /bin/bash -m mike`
-
`sudo`
: mert root hozhat csak létre új usert
...
...
@@ -224,40 +225,108 @@ almafa:x:1002:
patrik@ubuntu:~$
```
A
`/etc/group`
fájlban található a csoportok listája és azok tulajdonságai.
sudo cat /etc/group | grep alma:
-
`sudo`
csak root joggal olvasható vagy írható a
`group`
fájl
-
'cat' kiírja egy fájl tartalmát, ez most a group, vagyis a csoportok listája
-
a
`|`
segítségével a
`cat`
kimenetét odaadjuk egy másik program bemenetének (jelen esetben a
`grep`
)
-
a
`grep`
a bemenetére kapott szövegből az
`"alma"`
(rész)szót tartalmazókra fog szűrni
Ennek a segítségével leellenőrézhetó egy a csoport valóban létrejött.
#### Törlés
`sudo groupdel <groupname>`
parancs segítségével eltávolíthatunk egy csoportot.
```
patrik@ubuntu:~$ sudo groupdel almafa
[sudo] password for patrik:
patrik@ubuntu:~$ sudo cat /etc/group | grep alma
patrik@ubuntu:~$
```
Hasonlóan az előző ellenőrzéshez itt is ellenőrizhető,
hogy valóban eltávolításra került-e a csoport.
Mivel a kimeneten nem jelent meg semmi, megállapítható, hogy nincs alma szót
tartalmazó group.
#### Felhasználók hozzáadása
`sudo usermod -aG <groupname> <username>`
parancs segítségével felhasználót
lehet hozzáadni a megadott csoporthoz.
lehet hozzáadni a megadott csoporthoz.
A
`groups`
parancs segítségével megnézhetjük, hogy tényleg megtörténik a hozzáadás.
```
patrik@ubuntu:~$ sudo usermod -aG almafa mike
[sudo] password for patrik:
patrik@ubuntu:~$ groups mike
mike : mike sudo almafa
patrik@ubuntu:~$
```
Hozzáadni egy felhasználót egy csoporthoz nem csak a
`usermod`
segítségével lehet, hanem a
`gpasswd`
paranccsal is.
```
patrik@ubuntu:~$ groups mike
mike : mike sudo
patrik@ubuntu:~$ sudo gpasswd -a mike almafa
[sudo] password for patrik:
Adding user mike to group almafa
patrik@ubuntu:~$ groups mike
mike : mike sudo almafa
patrik@ubuntu:~$
```
`sudo gpasswd -a <username> <groupname>`
:
-
A
`gpasswd`
egy parancs, mely segítségével különböző műveleteket lehet
végrehajtani a csoportokon.
-
`-a`
kapcsoló, mely megadja, hogy hoozáadni szeretnénk egy felhasználót. (add)
-
`username`
a felhasználó, akit szeretnénk Hozzáadni
-
`groupname`
a csoport, amelyikhez szeretnénk hoozáadni a felhasználót
#### Felhasználók eltávolítása a csoportból
`gpasswd -d <groupname> <username>`
`sudo gpasswd -d <groupname> <username>`
parancs segítségével törölhetünk
egy felhasználót a csoportból.
### Superuser
```
patrik@ubuntu:~$ sudo gpasswd -d mike almafa
[sudo] password for patrik:
Removing user mike from group almafa
patrik@ubuntu:~$ groups mike
mike : mike sudo
```
Kicsit bővebben azon kívül, amit eddig mondtunk.
Bár lehet, hogy a UNIX elvek után/ beleépítve is mehetne, hogy kb mi.
Pontosan ugyanazt kell itt csinálni, mint amikor a
`gpasswd`
segítségével
hozzáadunk egy felhasználót, csupán a kapcsoló eltérő
`-d`
.
### [Superuser](https://en.wikipedia.org/wiki/Superuser#Unix_and_Unix-like)
Ez az oldal is jó: https://mediatemple.net/community/products/dv/204643890/an-introduction-to-the-root-user
The root is the user name or account that by default has access
to all commands and files on a Linux or other Unix-like
operating system. It is also referred to as the root account
, root user, and the superuser.
In computing, the superuser is a special user account used for
system administration. Depending on the operating system (OS),
the actual name of this account might be root, administrator,
admin or supervisor. In some cases, the actual name of the account
is not the determining factor; on Unix-like systems, the user with a user identifier (UID) of zero is the superuser,
regardless of the name of that account and in systems which
implement a role based security model, any user with the role
of superuser can carry out all actions of the
superuser account. The principle of least privilege recommends
that most users and applications run under an ordinary account
to perform their work, as a superuser account is capable of
making unrestricted, potentially adverse, system-wide changes.
In Unix-like computer OSes (such as Linux), root is the conventional
name of the user who has all rights or
permissions (to all files and programs) in all
modes (single- or multi-user).
<!--
TODO: Ezt megírni, attól függ mit akarsz a videóba Mike.
-->
## Init rendszer
...
...
@@ -320,6 +389,8 @@ igény szerint kézzel indítani, leállítani, újraindítani.
`journalctl --since "1 hour ago"`
Egy időpont óta történt események
#### Saját program használata szolgáltatásként
## Hálózat alapszintű konfigurálása
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment