The flashcards below were created by user
on FreezingBlue Flashcards.
User account information
Example: guru:x:464:464:Test account:/home/guru:/bin/bash
Group account information
- Encrypted passwords are stored in root user read only files. Also controls advanced password parameters such as password aging.
- Structure:login name
- encrypted password
- date, in days since epoch, of last change
- number of days until change allowed
- number of days until change required
- number of days prior to expiration to begin warning
- number of days after expiration before account disabled
- date, in days since epoch, that password expires
- New users can be added to the system by the root user. useradd is controlled by:
- command line options
- /etc/login.defs config file
- /etc/default/useradd config file
deleting existing users
bulk import of new users
opens default EDITOR for editing
used to change user's GECOS/finger information
creating new groups
deleting existing groups
usermod -a -G
append group additions
preventing interactive login
7th field of /etc/passwd
- /bin/false -- simply exits with a return code 1
- /bin/nologin -- exits with message "This account is currently not available." or the contents of /etc/nologin.txt if it is present.
When useradd is used the contents of this directory are copied of the the new user's home directory.
- like su but adds:
- ability to log commands run
- ability to give more granular access to privileged commands on a user-by-user basis
user must be in the /etc/sudoers file to use the command.
Command provides control over the consumption of resources available to the shell and to processes started by it.
- -a -- All current limits are reported
- -c -- the max size of core files created
- -d -- the max size of a process's data segment
- -f -- the max size of files created by the shell
- -l -- the max size that may be locked into memory
- -m -- the max resident set size
- -n -- the max number of open file descriptors
- -s -- the max stack size
- -t -- the max amount of cpu time in seconds
- -u -- max # of processes available to a user
- -v -- max amount of virtual memory available to shell
system wide sh: configuration files
per user sh: configuration files
Spawn a new shell and run sprit_name
- sh script_name
Run script_name in the current shell
- source script_name
- . script_name
bash: Configuration Files
- when invoked as a login shell:
- /etc/profile then
- one of the three ~/.bash_profile, ~/.bash_login, ~/.profilethen ~/.bash_logout if it exists
when invoked as a sub shell, ~/.bashrc
add a default gateway
route add default gw 192.168.1.1
INSERT INTO table (field, ...) VALUES (values, ...)
- INSERT INTO restaurant (name, category_id, rating) VALUES ('Macho Taco', 3, 5);
UPDATE table SET field = 'value', ...WHERE condition, ...
- UPDATE restaurant SET rating = 4 WHERE name = 'Macho Taco';
SELECT field, ...FROM table, ...WHERE condition, ...
- SELECT * FROM restaurant WHERE category_id = 2;
- output: 1|Macho Taco|2|5
DELETE FROM table WHERE condition, ...;
#vi /etc/aliases --- edit to add aliases
# newaliases --- run to activate additions to aliases file
Executes a task once at some time in the future.
at or batch
Executes a task at a recurring interval
At system boot, runs jobs missed while the system was off.
- at uses queue "a" batch uses queue "b" by default. A-Z are available though.
- Queues with higher letters are run with increased niceness.
- if .deny exists, users that are listed in it can not use at; all others can.
- if .allow exists, only users in that list are allowed to use at.
- if .deny exists, users that are listed in it can not use cron; all others can.
- if .allow exists, only users in that list are allowed to use cron.
list/display the current cron table
edit the current cron table
removes the entire current cron table
- /etc/cron.d -- a more flexible crontab folder, allows specifying username.
anacron config file
- 32 bit
- contain 2 pieces (network,host)
- connection oriented
- 20 byte header
- 8 byte header
- file that helps identify most of the commonly used ports.
TCP 25, 465
SMTP SSMTP (mail)
TCP 143, 993
IMAP IMAPS (email)
- has 128bit addressing
- first appeared in 1996
- Header simpler
- improved end-to-end security
- Stateless auto-configuration
- Greatly expanded IP address space
common network interfaces
- +Enhanced functionality specific to Ethernet hardware
- +Dispay and configure Ethernet inerface settings
- +Display Available Options: ethtool (no parameters)
- +Display Setitngs on Inerface: ethtool eth#
- +Configure basic settings: ethtool -s eth# OPTION VALUE
- + OLD!
- +Access to generic, hardware independent MII capabilities of most networking hardware
- +May work better than ethtool on some old hardware
- Start: ifconfig eth0 up
- Stop: ifconfig eth0 down
Identifies name servers and name resolution options
only allows three nameserver entries, any additional entries are ignored.
Identifies hostnames and aliases with IP addresses
Generates UDP probe packets, to hopefully unused ports, with increasingly larger TTL values.
A specialized traceroute like utility that sends ICMP Echo messages encapsulated in IP packets
mtr can output results in many formats including a real-time updating display (default).
can be used to print network connections, routing tables, interface statistics, and masqueraded connections.
- -rn view the routing table
- -s view protocol statistics
- -ta list all TCP connections and listening ports
- -ua list all UDP connections and listening ports
- -ape list TCP UDP and UNIX socket connections and their associtated state, user, program PID/name
-taupen lists everything. good one to remember.
scan list services listening on a remote machine
main X configuration file.
frints out info about specific window. Info includes:
- +color depth
Display info includes:
Different graphical logins
- xdm -- not really inuse anymore
- gdm -- standard
- kdm -- used but not standard
command used to control host-based access
xauth add --
- token-based X access control
- tokens stored in $XAUTHORITY file ( ~/.Xauthority is the most common file)
- uses the MIT_MAGIC_COOKIE_1
adds stores MIT-cookie
starting the X server
- startX starts the full graphical interface
- xinit starts X and opens a terminal
- X only starts the X server and nothing else
primary way of interacting with the hardware clock
primary way of interacting with the system clock
command used to synchronize the local system clock to a remote system running an NTP deamon
deamon used to connect to NTP servers
ntpd config file
config file for the syslogd
standard location for log files
- logs system messages
- conffigured in /etc/syslog.conf
- supports remote logging (-r option)
receives messages from the kernel and sends them to syslogd
message priority level
open source SQL databases
commercial/closed source SQL Databases
create new aliases for email
set up forward of mail
edit the "~/.forward" file
send an email, reply to an email,
view the mail queue