DECK 2 Flashcards
chown user /dir/files
changing ownership doesn’t affect permissions
chgrp group /dir/file
makes the user of those files
changes groups that owns files
read 4 = can open and list
write 2 = modify and create/delete
execute 1= can run and change (cd)
when…is applied, it makes files and dir executable.
special x (X), is recursive
-x
chmod 750 myfile
if you have write permissions for a directory you can delete ANY non-sticky/immutable file.
chmod g+s dir= applies SGID to a directory
chmod +…dir = applies sticky bit
chmod 3770 dir = does BOTH SGID AND sticky
give rwx to owner, rx to group, nothing (-) to others
-t
umask is locate in /etc/….
set user-specific overrides in ~/.bashrc
default permissions for directories are 666, default for files is 777
umask 0022?
bashrc
-first 0 is special permissions that are set by SGID/sticky,
MUST CHANGE UMASK IN /etc/bashrc IF YOU WANT IT TO BE PERSISTENT!
. .bashrc applies umask changes IMMEDIATELY
ip link sh shows?
-current device and bios name and NIC info
hostname set-hostname is used to set hostnames
hostnames are resolved in /etc/…. and is useful for LOCAL host only
/etc/resolv.conf contains…
/etc/nsswitch.conf does what?
-hosts
-DNS entries
determine order of resolution of hostnames
when you change your hostname, add it to /etc/hosts:
ex: xxx.xxx.xxx.xxx hostname.com hostname
use ip NOT ipconfig
chmod a+x filename
chmod u-x filename
chmod -R a+X dirname
Makes a file exec (x) for all (a). Can also use u/g/o as well, of course
Takes away (-) exec on a file
Makes a dir exec (X) BUT, thia capital X only applies to EXISTING files with exec permissions
systemd service that manages network configuration
Configuration is stored in files in /etc/NetworkManager/system-connections
nmcli and nmtui are also net config tools
NetworkManager
in NetworkManager, devices are…
….. has permissions to modify settings in NetworkManage
Non-privileged users logged in can change net settings but NOT via…
nmcli general permissions shows current permissions
-network interfaces
-dbus
-ssh
USE NMTUI FOR EXAM!
if connection doesn’t automatically come up, do what in NMTUI
Make sure you ACTIVATE or DE-ACTIVATE in nmtui (depending on what you are accomplishing)
-check connection is set to “automatically connect”
TROUBLESHOOTING NETWORK
ping6 test IPV6. must use…in with LINK LOCAL address (ex: ping6ff02::1%ens33
ip route prints route table, ip -6 route does that for ipv6, tracepath/6 does that for ips/websites
…anaylses socket stats
-nic name
-ss
if you can’t ping, you probably don’t have …
-default route
RPM
rpm -qa= shows all INSTALLED packages
rpm -qf filename = shows?
list files installed from a package?
show scripts executed while installing package? rpm -q –……
-which installed package owns a filename
-rpm -ql
–scripts
rpm2cpio package-1.0.rpm | cpio -tv=
rpm2cpio package-1.0.rpm | cpio -idmv=
shows contents of a package
extracts package in current directory