Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
40 Cards in this Set
- Front
- Back
What is the first line of a bash script?
|
#!/bin/bash
|
|
In Chmod what do all of the options mean?
chmod augo +wrx a = u = g = o = w = r = x = |
a = all users
u = user g = group o = other w = write r = read x = executable |
|
Using grep find the lines that contain “0304 2013" in the file myfile.txt and append it to newfile.txt
|
grep "0304 2013" myfile.txt >> newfile.txt
|
|
Use awk to print the first and tenth field delimitated by | in the file myfile.txt
|
awk -F "|" '{print $1,$10}' myfile.txt
|
|
Open crontab, add a program myreport to run at 3:47 every Wednesday the 14th of August.
|
crontab -e
47 3 14 8 3 myreport |
|
Open crontab, add a program "myreport" that runs at 8:00am/pm every thursday.
|
crontab -e
0 8,20 * * 4 myreport |
|
Use tail to continue to display the last lines
|
tail -f
|
|
How to manage users that can run crontab.
|
/etc/cron.allow
/etc/cron.deny |
|
What does DNS stand for?
|
Domain Name Services
|
|
What does BIND stand for?
|
Berkley Internet Name Domain
|
|
What port does DNS run on?
|
53
|
|
What does DNS do?
|
Maps IP's to hostnames and hostnames to IP's
|
|
What file do you edit to make 141.219.16.30 your DNS server?
What do you add to this file? What if you want to add srv01 as a DNS server? |
/etc/resolv.conf
nameserver 141.219.16.30 nameserver srv01 |
|
Where do you configure the zone information?
|
/etc/named.conf
|
|
Where is the zone file/record created?
|
/var/named
|
|
In /var/named what are these kinds of records?
MX = CNAME = A = NS = SOA = TXT = |
MX = mail server
CNAME = alias A = IPv4 address NS= name server SOA = Start of Authority TXT = descriptions |
|
How/Where do you change the order of priority for DNS, files, and NIS?
Put DNS server first, then files, then NIS |
/etc/nsswitch.conf
hosts: dns files nis |
|
How do you set your DNS nameservers on the interface?
|
/etc/sysconfig/network-scripts/ifcfg-eth0
DNS1= srv01 DNS2= 141.219.16.0 |
|
Where to manually do IP to hostname mapping?
Map 172.16.2.8 to srv01 |
/etc/hosts
172.16.2.8 srv01 |
|
How would you provide IP/host names in a small network using NIS
|
vi /etc/nsswitch.conf
hosts: nis files Then /etc/hosts has to be converted into an NIS database file |
|
What does ICANN stand for and what does it do?
|
Internet Corporation for Assigning Names and Networks
This delegates to root domains and top level domains. |
|
What is a zone?
|
An administrative space.
|
|
What is a chroot jail?
|
This allows you to prevent ordinary users from accessing the root directory. It creates a subdirectory and sections it off.
|
|
In the named.conf file what does ____ do?
listen on allow query allow recursion allow-transfer notify |
listen on- the port that DNS is going to be on
allow query- who is allowed to query the DNS server allow recursion- who is allowed to make recursive queries to this server allow-transfer- what slaves are allowed to transfer slave files notify- notifies slave servers |
|
What does the effect of lowering the DNS ttl have?
|
Shortens the time the DNS cache lives and will increase load on DNS server because it will have to always look for information.
|
|
How to see what files are being shared from srv01 while on the client machine?
|
showmount -e srv01
|
|
Which command line lists the currently mounted NFS directories?
|
df -t nfs
|
|
Command to mount /home from server plum to /plum.home on local server.
Unmount it |
mount plum:/home /plum.home
umount /home |
|
From a server, how would you allow readonly access to /opt for any system in example.com?
Where would you place this line? |
In /etc/exports
/opt *.example.com(ro,no_subtree_check) |
|
root_squash and all_squash map users to UID ___?
|
65534
|
|
What does nosuid do?
|
This stops programs from running as the root user. This is a security threat.
|
|
Difference between passwd and yppasswd
|
Passwd changes password on local machine
Yppasswd changes password on NIS server |
|
Why does /etc/passwd file need two NIS maps
|
You can look things up by username and uid
|
|
How can you determine if a working directory is the home directory of an NIS user?
|
ypcat passwd | grep $(pwd)
|
|
What kind of DNS record will be returned when a Web browser resolves the domain part of a URL?
|
A DNS record type
|
|
What are MX resource records for?
|
Mail exchange server, they hold the name of the mail server
|
|
Set system to use local DNS server at 192.168.1.254 or ISP DNS at 1.2.3.4
|
vi /etc/resolv.conf
nameserver 192.168.1.254 nameserver 1.2.3.4 |
|
How to instruct DNS server to respond to queries only from 137.44*
|
Edit /etc/named.conf
Add allow-query {137.44.0.0/16} |
|
Which part of DNS is most vulnerable to an attack from a malicious user and why?
|
Primary master server because requests are recursive here and you could implement a DoS attack
|
|
Outline a method to make DNS support encryption.
|
You could use TSIGs to make sure the master/slave server are actually the correct server.
|