LPIC1.pt1 Flashcards
/etc/aliases.db
/etc/aliases.db
database file that your local MDA will read to determine where to send email, it has to be updated when any changes are made to the aliases on the system
usermod
- modify the characteristics and/or membership of existing users
- -c [description] - modifies the user description in the /etc/passwd file
- -d [new home directory] - changes the user’s home directory
- -e [date] - change the date of account expiration
- -f [# days] - change the number of days after a password reaches max age the account will still allow login
- -g [GID] - change the user’s primary GID
- -G [GID] - change the user’s secondary GID(s) (can be multiple groups in a comma delimited list)
- -s [path and file of login shell] - changes the full path and name of the default login shell for the user
- -u [UID] - changes the UID (NOTE: will change home directory to match, but not any other user owned files)
- -L - locks the user’s account
- -U - unlocks the user’s account
special UID’s
- UID 0 - root/admin user on any system
- UID 1 - ‘bin’ user (system binaries and nonlogin accounts)
- UID 48 - apache user (if installed)
- UID 99 - ‘nobody’ account (used for a variety of things, FTP anonymous access for example, may also map to a root account for certain NFS configurations (i.e. the root_squash option))
dpkg-reconfigure [current desktop manager]
allows reconfiguration of display manager, screen should prompt for any installed DM (on Debian/Ubuntu systems)
/etc/systemd/journald.conf
- configuration file for journald
- common settings are for size of log and whether logging is forwarded to syslog as well (or installed equivalent)
[Journal]
SystemMaxUse= how much disk space the journal can use. default is 10%
RuntimeMaxUse= how much ram the journal can use. Default is 10%
SystemMaxFileSize= how large individual log files can get
RuntimeMaxFileSize= hot large log files can get in RAM
MaxRetentionSet= how long log files will be kept. default is 1 month.
cupsctl
used to control CUPS configuration, run with no options, displays the current configuration
ip forwarding
- the ability for your host to forward packets to another location and respond
- allows your system to function as a router
- two methods to enable:
1. echo 1 > /proc/sys/net/ipv4/ip_forward
2. edit /etc/sysctl.conf and add ‘net.ipv4.ip_forward=1’ - NOTE: method one is not permanent but will take immediate effect, method two requires a reboot (or combined with method one)
ect/securetty
defines where the root user is allowed to log in (if it does not exist, root can login from anywhere)
xdm
- display manager that is part of the Xorg software package
- /usr/bin
- directory where it will exist if installed
- xorg-x11-xdm
- package for the display manager
- not generally installed/used unless no full desktop environment is being used
- /etc/X11/xdm
- configuration directory
ntp / ntpd
- Network Time Protocol
- network time protocol daemon (service)
- allows you to define a pool of network servers that are synchronized to a globally distributed network of time servers
- those that get a time update from a ‘reference’ clock (like the naval observatory in the USA) are called ‘stratum 1 servers’
var/log/journal
binary file wherein the systemd log is stored if configured to store log to disk (not default)
run/log/journal
binary file wherein the systemd log is stored if configured to store log to disk (default)
/var/lib/ntp/drift
file that track system time drift
iconv
- a utility used to convert between character encodings
- -c - clears unknown characters
- -f [type] - from indicated type
- -t [type] - to the indicated type
- -l - lists all available encoding types
- -o - specify new file to create
- for example - iconv -c -f ASCII -t MACCYRILLIC VNCHOWTO > VNCHOWTO.new.cyrillic
- would clear any unknown characters in the file stream from VNCHOWTO, and convert from ASCII to MACCYRILLIC encoding, writing the new file the VNCHOWTO.new.cyrillic
- NOTE: this is not a language translator, simply a character encoding translator
/etc/cups
- configuration directory for CUPS
- configuration file list:
- classes.conf - configures class definitions
- cupsd.conf - primary configuration file for the daemon
- cupsd.conf.default - sample default configuration file to revert to as backup
- printers.conf - configuration of each printer on the system
- ppd - directory of PPD (printer driver files) on each printer on the system
lightdm
- works as a service
- systemctl status lightdm (systemd systems)
- /etc/lightdm/lightdm.conf
- if it exists, will contain the configuration for the display manager
- designed to be a lighter weight display manager (and replaced kdm)
- /usr/share/doc/lightdm
- directory containing sample configuration file
xfs
- font server for X
* provides access to fonts for the X server
/etc/motd
if exists, displays the contents of this file when someone logs onto the system
logger
systemd-cat
- allows you or a command to log a message to /var/log/messages
- CTL-D to end and write the message
- -i - passed additional information to syslog
can also be used in a script
systemd-cat is the journald version of logger
ssh
- secure shell
- related commands (also secure) - scp, ssh-agent ssh-add
- -l [user] [host] - logs in as the specified user to the host
- [user]@[host] - logs in as the specified user to the host
- -X - enable SSH XWindow forwarding
- -x - disable SSH XWindow forwarding
-Y - new more secure way to forward XWindows
ssh -Y user@host
systemd (logging)
- uses it’s own logging system called ‘journal’ (with ‘journald’ being the daemon for it)
- adopted on most modern systemd based distributions
- primarily, the difference lies in that the logging is done to a binary rather than plain text file, allowing you the ability to query metadata, command line details, PIDs, binaries and security privileges (some of which just are not available with a plain text file)
- because it is part of the service management system, all daemon messaging is automatically logged rather than the sysvinit variant of syslog wherein each service is responsible for how and what messages are logged
xwininfo
- displays a plethora of window information on the chosen window on the desktop
- running the command will present you with a special pointer to choose the window to query for info
/ect/logrotate.conf
primary configuration for log rotation (defaults and system files to rotate)
- each file in logrotate.d adds or overrides settings to the defaults in the configuration file
- NOTE: files in logrotate.d are usually added/maintained by the package manager as part of the install/update/removal of packages
hwclock
allows you to work with the hardware clock directly
- outputs the hardware clock date/time
- NOTE: the hardware clock is unaware of time zones