Commit bbad291e authored by Dario's avatar Dario
Browse files

Fixed th style, links and more formatting (again)

parent f32c20e1
......@@ -84,7 +84,7 @@ We have this script folder, in which not all scripts hace the execution permissi
-rwxr-xr-x 1 parrot hackers 780 oct 18 01:17 wireless-dos-ids.py
-rw-r--r-- 1 parrot hackers 1587 oct 18 01:05 wireless-dos.py
As you can see in the execution of "ls -l scripts/", some scrpits have execution permissions for all the system users (which is not recommended), while others do not have execution permissioneven for the pwner user. To correct this error we apply the following permissions:
As you can see in the execution of `ls -l scripts/`, some scrpits have execution permissions for all the system users (which is not recommended), while others do not have execution permissioneven for the pwner user. To correct this error we apply the following permissions:
┌─[root@parrot-armhf]─[/home/parrot]
└──╼ #chmod -R 770 scripts/
......@@ -99,16 +99,25 @@ As you can see in the execution of "ls -l scripts/", some scrpits have execution
Now the owner user and the members of the owner group have read, write and execute permissions, while other users of the system do not have access to this file.
Another way to add or remove permissions is using these modes:
\
a --> indicates that it will be applied to all
\
u --> indicates that it will be applied to the user
\
g --> indicates that it will be applied to the group
\
o --> indicates that it will apply to others
\
° --> indicates that the permission is added
\
° --> indicates that the permission is removed
\
r --> indicates read permission
\
w --> indicates write permission
\
x--> indicates execution permission
\
The basic syntax for using "chmod" with these modes is as follows:
......@@ -147,13 +156,19 @@ Its basic syntax is the following:
$ chown [options] [owner]: [group (optional)] [files or directories]
Chown options:
-R --> Recursively changes the owner of the directories along with all its contents.
-v or --verbose --> Used to show a more descriptive output.
--version --> See the version number of the program.
-dereference --> Acts on symbolic links instead of on the destination.
-h or --no-deference --> In the case of symbolic links, change the owner of the destination instead of the link itself.
--reference --> Changes the owner of a file, taking as reference the owner of the other.
\
`-R` --> Recursively changes the owner of the directories along with all its contents.
\
`-v or --verbose` --> Used to show a more descriptive output.
\
`--version` --> See the version number of the program.
\
`-dereference` --> Acts on symbolic links instead of on the destination.
\
`-h or --no-deference` --> In the case of symbolic links, change the owner of the destination instead of the link itself.
\
`--reference` --> Changes the owner of a file, taking as reference the owner of the other.
\
Examples of use:
......@@ -208,19 +223,19 @@ The chgrp command is used to change the group to which a file or directory belon
Options
-R -> Recursively changes the group to which the directories belong together with all their contents.
`-R` -> Recursively changes the group to which the directories belong together with all their contents.
-v (or --verbose) -> Used to show a more descriptive output.
`-v (or --verbose)` -> Used to show a more descriptive output.
--version -> See the version number of the program.
`--version` -> See the version number of the program.
--dereference -> Acts on symbolic links instead of on the destination.
`--dereference` -> Acts on symbolic links instead of on the destination.
-h (or --no-dereference) -> In the case of symbolic links, change the destination group instead of the link itself.
`-h (or --no-dereference)` -> In the case of symbolic links, change the destination group instead of the link itself.
--reference -> Change the group of a file taking as reference the owner of another.
`--reference` -> Change the group of a file taking as reference the owner of another.
They are practically the same "chown" options, with the difference that "chgrp" only changes the group that owns files and / or directories, keeping the user owner.
They are practically the same **"chown"** options, with the difference that **"chgrp"** only changes the group that owns files and / or directories, keeping the user owner.
Example of use of chgrp:
......
## Hierarchy of filesystem and files ##
The main problem of every migrant user to GNU / Linux is the structure of files, since it is customary commonly to mention directories like "C: / users / User / Desktop" in Windows, which does not happen in the distribution GNU/Linux. To facilitate the "migration" of users to GNU/Linux, the hierarchy of filesystems contained in the aforementioned system will be explained in detail below. Framed in two basic types Static/Dynamic and Shareable/Restricted in which the entire Linux directory tree is organized.
The main problem of every migrant user to GNU / Linux is the structure of files, since it is customary commonly to mention directories like **"C:/users/User/Desktop"** in Windows, which does not happen in the distribution GNU/Linux. To facilitate the "migration" of users to GNU/Linux, the hierarchy of filesystems contained in the aforementioned system will be explained in detail below. Framed in two basic types Static/Dynamic and Shareable/Restricted in which the entire Linux directory tree is organized.
### Some features of the Linux files system ###
......@@ -11,13 +11,13 @@ The main problem of every migrant user to GNU / Linux is the structure of files,
### GNU/Linux typological classification ###
- STATIC: Contains files that only the root user can change. Binaries, libraries, documentation, etc. However, these are available for read-only by any other user of the system. Some of these directories are: /bin, /boot, /opt, /sbin, /usr, /proc, etc.
- **STATIC**: Contains files that only the root user can change. Binaries, libraries, documentation, etc. However, these are available for read-only by any other user of the system. Some of these directories are: /bin, /boot, /opt, /sbin, /usr, /proc, etc.
- DYNAMICS: As the name says, in this category are the files that can be modified, (some of them only by the root). These types of directories are usually backed up more often. Some of these directories are: /var/mail, /var/spool, /var/run, /home, etc.
- **DYNAMICS**: As the name says, in this category are the files that can be modified, (some of them only by the root). These types of directories are usually backed up more often. Some of these directories are: /var/mail, /var/spool, /var/run, /home, etc.
- SHAREABLE: These are directories that can de shared over the network.
- **SHAREABLE**: These are directories that can de shared over the network.
- RESTRICTED: Contains directories that can not be shared, that can only be viewed and/or modified by the root. Some of these directories are: /etc, /var/lock, /var/run, etc.
- **RESTRICTED**: Contains directories that can not be shared, that can only be viewed and/or modified by the root. Some of these directories are: /etc, /var/lock, /var/run, etc.
All Linux/Unix directories hang from the so-called root directory "/". You could at first glance make a comparison with the "C: \" Windows directory, however, there are notable differences between them:
......
......@@ -39,55 +39,54 @@ The Parrot package manager is apt. This manager is responsible for installing pa
- Search for a package or text string:
apt search <text_string>
`apt search <text_string>`
- Show packege information:
apt show <package>
`apt show <package>`
- Show a package dependencies:
apt depends <package>
`apt depends <package>`
- Show the names of all the packages installed in the system:
apt list --installed
`apt list --installed`
- Install a package:
apt install <package>
`apt install <package>`
- Unistall a package:
apt remove <package>
`apt remove <package>`
- Delete a package including its configuration files:
apt purge <package>
`apt purge <package>`
- Delete automatically those packages that are not been used:
apt autoremove
`apt autoremove`
- Update the repositories information:
apt update
`apt update`
- Update a package to the last available version in the repository:
apt upgrade <package>
`apt upgrade <package>`
- Update the system. It will update all the packages that have a higher version:
apt upgrade
`apt upgrade`
- Update the full distribution. It will update our system to the next available version:
apt dist-upgrade
`apt dist-upgrade`
- Clean caches, downloaded packages, etc:
apt clean
apt autoclean
`apt clean && apt autoclean`
These are just some examples. If more information is required, you shoul check the manual page (man 8 apt).
\ No newline at end of file
......@@ -31,7 +31,7 @@
- [Intro to GNU/Linux Security](<./Intro to GNU-Linux Security.md>)
- [Logs Under Control](<./Logs Under Control.md>)
- [Network Configuration - Parrot](<./Network Configuration - Parrot.md>)
- [Parrot Package Management.md](<./Parrot Package Management.md>)
- [Parrot Package Management](<./Parrot Package Management.md>)
- [Reverse Engineering](<./Reverse Engineering.md>)
- [Services](<./Services.md>)
- [Shell and Basic Commands](<./Shell and Basic Commands.md>)
......
......@@ -2,7 +2,7 @@
We are living at a time when systemd has "seized" the vast majority of linux systems. We don't want to enter into a debate about whether systemd is good or bad.
Parrot developers are clear: https://blog.parrotsec.org/debian-and-devuan/
Parrot developers are clear: [Debian and Devuan](https://parrotsec.org/blog/2017-06-13-debian-and-devuan/)
Anyway, if anything changes, it will be in the future. Currently the system has systemd, just like its older sister Debian.
......@@ -22,7 +22,7 @@ For many years, the Linux and Unix systems ID 1 process has been the "init" proc
The frequently used daemons were often booted at system startup with "system V and LSB boot scripts". Less often demons were started on demand as inetd or xinetd.
The "System V"system, which as has been said took many (too many?) years with us, had a number of limitations. This is why different starting systems have emerged to try to solve this. Debian (and the vast majority of distributions) have chosen "systemd" as the boot method.
The **"System V"** system, which as has been said took many (too many?) years with us, had a number of limitations. This is why different starting systems have emerged to try to solve this. Debian (and the vast majority of distributions) have chosen "systemd" as the boot method.
## systemctl and sytemd units ##
......@@ -48,9 +48,13 @@ We can see a list of the different types of units handled by systemd we can use
Some units are:
\
- "Service" units. They have a ". service" extension and represent the system services. This type of drive is used to boot frequently accessed daemons, such as a web server.
\
- "Socket units". They have the extension ". socket" and represent communication between processes (IPC).
\
- "Path" units. They have the extension ". path" and are used to delay the activation of a service until the Filesystem is active.
\
You can check all units in your system with the "systemctl list-unit-files"instruction. Check how each unit has an extension that tells us what type of object it is.
......
......@@ -6,7 +6,7 @@ But there will be tasks for which we need to become root or at least have their
## The command "su" ##
The "su" command is used to become another user. It can be root or it can be another user of the system.
The **"su"** command is used to become another user. It can be root or it can be another user of the system.
The general way to use it is:
......@@ -91,7 +91,7 @@ NOTE2: If we execute "su" as the root user, we will not be prompted for the pass
## The command "sudo" ##
The command "sudo" allows us to execute tasks like another user, without the need to know the password of such user. It is a way to delegate tasks to other users without the need to give any password (this way you should not share the root password).
The command **"sudo"** allows us to execute tasks like another user, without the need to know the password of such user. It is a way to delegate tasks to other users without the need to give any password (this way you should not share the root password).
## sudoers configuration ##
......@@ -217,6 +217,6 @@ In this last example the root password has changed ;-).
In summary:
su --> It makes us another user and we must know the corresponding password.
`su` --> It makes us another user and we must know the corresponding password.
sudo --> It allows us to execute commands like other users and we do not have to know the password of such user.
\ No newline at end of file
`sudo` --> It allows us to execute commands like other users and we do not have to know the password of such user.
\ No newline at end of file
......@@ -58,6 +58,10 @@
outline: 0;
}
th {
color: #000;
}
@media screen and (max-width: 415px) {
a.back-btn {
display: none;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment