Backups up at 23:05 every day of every mo on Mon-Sat.
How to restrict access for user scheduled cron jobs? 107.2
/etc/cron.allow and /etc/cron.deny. By default, only cron.deny is created that blocks guest acct. All others can create crontab scheds. When a cron.allow is created, *only* users listed can make scheds. All others denied. User crontabs stored in /var/spool/cron/
How do users manage their crontabs? 107.2
-e Edit, or make new. Opens vi.
-l To list crontab
-r To remove crontab.
Uses same format:
Min Hr DayofMo Month DaysofWk Cmd
What env variables define locale? 107.3
LC_CTYPE Default char type & encoding
LC_MESSAGES Config's natural lang msgs
LC_COLLATE Sorting rules
LC_NUMERIC # format
LC_MONETARY Currency format
LC_TIME Date and time display
LC_PAPER Default paper size
LC_NAME Default personal name fmt
LC_ADDRESS Default address fmt
LC_TELEPHONE Default phone # fmts
LC_MEASUREMENT Default meas. units
LC_ALL Overrides all other LC Env Vars
LANG Specifies default locale val for all LC-vars
LANGUAGE Overrides LC_Messages
Whats fmt for LC_CTYPE var? 107.3
UTF-8 is known as Unicode.
Order of precedence for Locale env vars? 107.3
If LC_ALL is defined, it's used. No other LCs used.
If LC_ALL is undefined, specific LC vars are checked.
If LC var has null val, then LANG var is used.
Cmd to check locale settings? 107.3
Cmd to set BIOS/hardware clock in Linux? 107.3
-r or --show (Is default option w/o cmd line options)
--set --date="9/16/11 08:00:00" (Arg is local time, even if hw clock is set to UTC)
-s or --hctosys Sets sys time to hwclock time.
-w or --systohc Sets hwclock time to sys time.
--utc or --localtime Specifies hwclock is config'd to use either UTC or local time.
Settings for hardware clock set to UTC vs local time? 107.3
In /etc/sysconfig/clock, change as follows:
HWCLOCK="-u" #for UTC
HWCLOCK="--localtime" #for local time.
Where is timezone info stored? 107.3
On some (e.g. Ubuntu), it's /etc/timezone
On some (e.g. OpenSUSE), it's /etc/sysconfig/clock
Can check it by using date cmd.
Available timezones in /usr/share/zoneinfo.
Cmd to set timezone? 107.3
Debian based (Ubuntu) use tzconfig. Others (OpenSUSE/Fedora) use tzselect.
Way to set timezone w/ symbolic link?
ln -sf /usr/share/zoneinfo/MST /etc/localtime
Note that -f is "force", which removes an already existing destination file.
Cmd to convert files from one encoding type to another? 107.3
What are some commonly used text encoding schemes? 107.3
iso8859 (aka latin-9) - designed for Western European languages
ASCII - English based char encoding
UTF-8 Unicode - for all languages, worldwide.
How to set system date and time? 108.1
Had to search net.
How to configure ntp? 108.1
Ensure pkg installed. Then check /etc/nftp.conf file. Ensure following lines exist, as fallback:
server 127.127.1.0 # local clock (LCL)
fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
Then ensure not on insane time (>17 min diff). If it is, run "ntpdate addrOfTimeProv" to do initial sync (ntpd must be stopped!). Newer ntp versions let you specify "etc/init.d/ntp ntptimeset" which does quick sync. Then start daemon. Do "insserv ntp" to have it run on start.
How to check ntpd status/progress? 108.1
ntpq -p - Shows status of daemon.
ntptrace - Traces how consumer is receiving time from provider (incl stratum, etc).
Pool of servers? 108.1
Roundrobin volunteer servers
Syslog configuration files 108.2
Logs stored in /var/log. Most svcs config'd to write to /dev/log, which is run by syslogd svc. syslog then looks at /etc/syslog.conf file to determine what to do. Syntax for etc/syslog.conf is:
Facilities are subsystems that provide msgs. All assigned to one: authpriv, cron, daemon, kern (kernel), lpr, mail, news, syslog (for daemon itself), user, uucp, local0-local7 (for self-dev'd applications). Priorities are usually handled by klogd. Priority choices: debug (All info), info, notice, warn, err (Serious), crit alert or emerg (critical). p680
Useful/common log files. 108.2
boot.log - Log entries from daemons during startup.
boot.msg - Shows all msgs displayed on screen during boot.
faillog - Failed auth attempts
firewall - Firewall log entries
lastlog - Last login info for users. View w lastlog cmd.
mail - Msgs from postfix or sendmail.
messages - Messages from most running processes. One of most useful.
warn - Warning messages.
wtmp - List of user's authenticated. View w last cmd.
Log rotation. 108.2
logrotate. Config'd with /etc/logrotate.conf. Contains defaults. Can customize for certain ones with placing config file in /etc/logrotate.d. p682
How to manually add entry to log files? 108.2
logger -p facilility.priority "log_message"
How to create email aliases? 108.3
Edit /etc/aliases. Add using this format:
alias: list of actual email addys (separated by commas).
Then run newaliases cmd to enable them. p631.
Config email fwding. 108.3
Create ~/.forward file that contains email addys, delimited by commas. Note that msgs will not be delivered to actual address. p630
Commonly available MTAs (Mail Transfer Agents). 108.3
sendmail - oldest. Non-componentized. Can be hard to config.