Cheat Sheet para GSEC
|
Binary
|
Decimal
|
Representation
|
|
000
|
0
|
- - -
|
|
001
|
1
|
- - x
|
|
010
|
2
|
- w -
|
|
011
|
3
|
- w x
|
|
100
|
4
|
r - -
|
|
101
|
5
|
r - x
|
|
110
|
6
|
r w -
|
|
111
|
7
|
rwx
|
|
Peso - SUID
|
UGO
|
|
4
|
Usuário
|
|
2
|
Grupos
|
|
1
|
Outros
|
|
Option
|
Description
|
|
-a
|
Mounts all file systems listed in /etc/fstab.
|
|
-F
|
Forks a new incarnation of mount for each device. Must be used in combination with the -a option.
|
|
-h
|
Displays the help file with all command options.
|
|
-l
|
Lists all the file systems mounted and adds labels to each device.
|
|
-L [label]
|
Mounts the partition with the specified [label].
|
|
-M
|
Moves a subtree to another location.
|
|
-O [opts]
|
Used in combination with -a, it limits the file system set that -a applies to.
|
|
-r
|
Mounts the file system in read-only mode
|
|
-R
|
Remounts a subtree in a different location, making its contents available in both places.
|
|
-t [type]
|
Indicates the file system type.
|
|
-T
|
Used to specify an alternative /etc/fstab file.
|
|
-v
|
Mounts verbosely, describing each operation.
|
|
-V
|
Displays the program version information.
|
|
Comando
|
Descrição
|
Exemplo
|
|
newgrp
|
Muda, temporariamente, o grupo do usuário
|
newgrp [nome_do_grupo]
|
|
groupadd
|
cria um novo grupo de usuários
|
groupadd [nome_do_grupo]
|
|
groupdel
|
deleta um grupo de usuários do sistema
|
groupdel [nome_do_grupo]
|
|
groupmod
|
modifica um grupo de usuário. -n para nome, -g altera gid, -o altera gid mesmo que outro grupo ja possua esse gidg paras do sistema
|
groupmod -n [nome_novo] [nome_antigo]
|
|
groups
|
exibe os nomes dos grupos aos quais um usuário pertence
|
-
|
|
chgrp
|
comando altera o nome de grupo de arquivos. -c : informa quais arquivos estão tendo o nome de grupo alterado, -v : informa quais arquivos estão sendo processados (não necessariamente alterados), -R : altera, recursivamente, o nome de grupo dos arquivos.
|
chgrp [opções] [grupo] [arquivo]
|
|
chown
|
permite alterar o nome do dono e/ou do grupo de arquivos. -c : informa quais arquivos estão sendo alterados, -h : altera o link, não o arquivo apontado pelo link, -v : informa quais arquivos estão sendo processados (não necessariamente alterados), -R : altera, recursivamente, dono e/ou grupo de arquivos.
|
chown [dono][:grupo] [arquivo]
|
|
chroot
|
muda o diretório root do processo corrente e de seus processos filhos.
|
chroot <diretório> [comando]
|
|
usermod
|
utilizado para modificar parâmetros do usuário.
|
usermod [parâmetro] [grupo] [usuário]
|
|
Run Level
|
Description
|
|
0
|
System halt i.e., the system can be safely powered off with no activity.
|
|
1
|
Single user mode.
|
|
2
|
Multiple user mode with no NFS (network file system).
|
|
3
|
Multiple user modes under the command line interface and not under the graphical user interface.
|
|
4
|
User-definable.
|
|
5
|
Multiple user mode under GUI (graphical user interface) and this is the standard runlevel for most of the LINUX-based systems.
|
|
6
|
Reboot which is used to restart the system.
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.