The flashcards below were created by user
sethwalton
on FreezingBlue Flashcards.
-
What files stores the default settings for new users ?
/etc/default/useradd
-
What file stores the default settings for new users in /etc/shadow?
/etc/login.defs
-
What directory stores default hidden files for newly added users ?
/etc/skel
-
What does the -M option do for useradd ?
Adds user without a home directory.
-
What does the -m option do for useradd ?
create a home directory for the user.
-
What does the -G option do for useradd or usermod ?
list of supplementary groups.
-
What does the -e option do for useradd or usermod?
date on which the accoount will expire.
-
What does the -f option do for useradd or usermod ?
Days after a password expires until account is disabled.
-
What does the -g option do for useradd ?
Name or number of the user's primary group.
-
What does the -s option do for useradd or usermod?
specify the user's shell
-
What does the -u option do for useradd or usermod ?
manually specify the uid. (by number)
-
What does the -r option do for useradd ?
create a "system" account, same as --system
-
What does the -p option do for useradd or usermod?
specify crypt password.
-
What does passwd -S <user> do ?
report the password status for an account.
-
What is the comand to unlock a password for a user ?
passwd -u <user>; or --unlock
-
What is the comand to lock a password for a user ?
passwd -l <user>, or --lock
-
What is the comand to delete a password for a user ?
passwd -d <user>, or --delete
-
What does "passwd -m 3 <user>" do ?
Sets the Minimum days before a password can be changed to 3 days, or --mindays
-
What does "passwd -x 3 <user>"do ?
This sets the maximum bumber of days a password remains and valid before it must be changed. or --maxdays
-
What does "passwd -i 3 <user>" do ?
Sets the number of days the can be accessed after expiration. or --inactive
-
What does "passwd -w 3 <user>" do ?
Set the number of days until a password change is required. or --warndays
-
What does usermod -c "txt" do ?
adds a comment to the user account "txt"
-
What does "usermod -U ,user> " do ?
unlock the user account; or --unlock
-
What does the "usermod -d" do ?
Allows you to specify a new home directory location
-
What does "usermod -l <user> " do ?
Specficy a new login name
-
What does "userdel -r <user>" do ?
Removes the user and home directory and mail spool entries.
-
What does the -r option do for groupadd ?
adds a system group
-
What does the -g option do for groupadd ?
Allows you to specify a GID
-
What does the -p option do for groupadd ?
Specify an encrypted password.
-
What does "groupmod -A "ksanders" dbusers" do ?
Adds ksanders to the dbusers group.
-
What does "groupmod -R "ksanders" dbusers" do ?
Removes ksanders from the dbusers group.
-
What is the global configuration file for ssh ?
/etc/ssh/ssh_config
-
What is the option to to tunnel X11 using ssh in the config file ?
ForwardX11 yes
-
What is the ssh option to enable X11 forwarding ?
ssh -X
-
What does ssh -f user@host do ?
The -f tells ssh to go into the background just before it executes the command.
-
What does ssh -N do ?
the -N instructs OpenSSH to not execute a command on the remote system.
-
What does ssh -L do ? What is the format ?
The -L 2000:personal-server.com:25 is in the form of -L local-port:host:remote-port.
-
Waht option is the ssh config file is needed for port forwarding ?
AllowTcpForwarding yes
-
What is the command to create gpg key ?
gpg --gen-key
-
What does GPG stand for ?
Gnu Privacy Guard (GPG)
-
What are 2 GPG front ends ?
Seahorse and KGPG
-
What file is the GPG secret keyring?
~/.gnupg/secring.gpg
-
What file is the gpg public keyring ?
~./gnupg/pubbring.gpg
-
What file is the gpg trust database ?
~.gnupg/trustdb.gpg
-
How does GPG work?
GPG first generates a random symetric key and uses it to encrypt the message being sent. The symetric key itself is encrypted using the recipients public key and sent along with the meaage. When the recipient recieves the message GPG first decrypts the symetric key using the users private key then dycrypts the message using the prior encrypted symetric key.
-
What Symetric encryptions does GPG support ?
AES, 3DES, Blowfish
-
What asymetric encryptions does GPG support ?
Elgamal and RSA
-
What hashes does GPG support ?
MD5, SHA-1 and SHA-2, RIPEMD-160
-
What digital signatures doe GPG support ?
DSA and RSA
-
What is the command to create an ssh rsa key pair ?
ssh-keygen -t rsa
-
What is the filename for a public ssh rsa key ?
~/.ssh/id_rsa.pub
-
What is the name if the ssh public keys file?
~/.ssh/authorized_keys
-
What is the command to start the ssh agent passphrase program ?
ssh-agent bash
-
What is the command to add a pass phrase to the ssh agent ?
ssh-add ~/.ssh/id_rsa then supply the pass phrase
-
What does ssh-agent -l do ?
list stored pass phrases
-
When using gpg --gen-key what information needs to be supplied ?
- Type of Key DSA/RSA
- size 2048 (default)
- How long the the key should be valid (2yrs)
- Real Name
- Email address
- Comment
- passphrase
-
What is the command to encrypt a file named mytestfile.txt for myuser using GPG ? And what is the resulting encrypted file name ?
- gpg -e -r myuser mytestfile.txt
- mytestfile.txt.gpg
-
What is the command to decrypt a GPG file named mytestfile.txt.gpg to a name of mytestfile.txt ? What else needs to be provided ?
- gpg --output mytestfile.txt --decrypt mytestfile.txt.gpg
- or
- gpg -o mytestfile.txt -d mytestfile.txt.gpg
- the pass phrase.
-
What is the command to export a public gpg key for user myuser to a file gpg_myuser ?
gpg --export myuser > gpg_myuser
-
What does ssh -Y do ?
Enables trusted X11 forwarding.
-
What does useradd -D do ?
Shows what the defaults are for adding a new user.
-
What is the option in /etc/ssh/ssh_config that controls requests for storing ssh keys? And what are the settings ?
- StrictHostKeyChecking
- yes - requires manually adding keys
- ask - asks about new keys
-
What is the ssh_config option that restricts users list from logging in ?
- DenyUsers login1 login2
- (separated by spaces)
-
What is the ssh_config option that restricts all users from logging in except ones listed ?
- AllowUsers login1 login2
- (separated by spaces)
-
If a server has multiple addresses, what is the ssh_config option to restrict to 1 address:port combo
ListenAddress x.x.x.x:x
-
What file stores newly added user defaults ?
/etc/default/useradd
-
What is the command to change the password aging of mylogin to 3 minimum days, 30 maximum days and 7 warning days ?
chage -m 3 -M 30 -W 7 mylogin
-
What is the command to set an expriation date for mylogin to Jan 1st 2013 ?
chage -E 2013-01-01
-
What is the command to add a group dbusers?
Option to specify a GID?
Option to specify a password ?
Option to specify a system group ?
- groupadd dbusers
- -g - Specify a GID
- -p Specify a password "openssl passwd -crypt"
- -r System group
-
What is the command to remove a group called dbusers ?
groupdel dbusers
-
What is the command to remove a login mylogin from the system and all file even if not owner buy mylogin ?
userdel -fr mylogin
-
In the/etc/shadow what are each of the fields ?
mylogin:*:14839:0:99999:7:::
What does the * mean ?
- Username mylogin
- encrypted password (*) means the account can't login
- last modified 14839 days since 1/1/1970
- Min days 0 before password can change
- max days 99999 must change password
- days warning about password change 7
- disabled days ::
- days to wait after expriy to disable the account
- expire :: days since 1/1/1970 until account will be disable, blank is never
-
What are each of the fields in /etc/passwd?
myuser:x:1004:1005::/home/myuser:/bin/bash
- Username : myuser
- password x >> /etc/shadow
- UID : 1004
- GID : 1005
- Full Name : :
- Home Directory : /home/myuser
- Default Shell /bin/bash
-
What is the range if UIDs reserved for system accounts ?
0-499
-
What are the fields for the /etc/group entry ?
mygroup:x:1004:monkeys:
- format
- Group:Password:GID:Users
-
What is the command to import a gpg public key file gpg_myuser.pub to the key ring ?
gpg --import gpg_myuser.pub
-
What is the command to list all gpg keys ?
gpg --list-keys
-
What adaptive technology allows users to lock modifier keys so only one finger is required ?
StickyKeys
-
What adaptive technology enables key sequences to the mouse cursor on the screen and send clicks ?
MouseKeys
-
What adaptive technology must hold a key down for a period of time before the key stroke is actually sent - to prevent errors ?
SlowKeys
-
What adaptive technology Sounds an audible alert if either CAPS LOCK Or NUM LOCK key is on ?
ToggleKeys
-
What adaptive technology configures the time before a held key repeats ?
RepeatKeys
-
What adaptive technology inserts a delay before keystroke ?
BounceKeys and DelayKeys
-
What adaptive technology sends double click when holding down the primary mouse button for a specified time ?
Simulated secondary click
-
What adaptive technology sends mouse click whenever the mouse pointer stops moving for a specified time ?
Dwell click
-
What is the location of the xdm configuration files ?
/etc/X11/xdm/xdm-config
-
What is the location of the kdm configuration files ?
/etc/kde/kdm or /etc/X11/kdm
-
What is the location of the gdm configuration files ?
/etc/X11/gdm or /etc/sysconfig/displaymanager
-
What is the command to enter the MySQL database as root from the local host.
mysql -h localhost -u root -p
-
What is the MySQL command to see all administered databases?
SHOW databases;
-
What is the MySQL command to enter a particular database bookstore ?
USE bookstore;
-
What is the MySQL command to delete a table books?
DROP TABLE IF EXISTS books;
-
What two MySQL commands to see the field structure of a table books?
- EXPLAIN books;
- or
- DESCRIBE books;
-
What is the MySQL command to display all entries in a table books?
SELECT * FROM books;
-
What is the option -P for lpr ?
- lpr -P printer_name file_name
- Prints files to the named printer.
-
What are the options -m, -q and -r for lpr?
- -m Send email upon job completion.
- -qHold (or queue) the job for later printing
- -rRemove the file after it has been spooled for printing.
-
What are the options for lpr ? -C, -J, -T,
- -C, -J, or -T "name"
- Set a job name.
-
Explain the declare options -a, -f, -x, -r -i
- declare
- -a indicies >> arraydeclare
- -f function_name >> functiondeclare
- -x var3 >> export declare
- -r var1 >> read only declare
- -i var2 >> integer
-
What command will scan for open TCP ports on myhost?
- nmap -sT myhost
- (-s) scan
- (TCP)
-
What command will scan for open UDP ports on myhost?
- nmap -sU myhost
- (-s) scan
- (-U) UDP
-
What is the iptables command to list the rules in all chains for table filter?
iptables -t filter -L
-
What does the following do ?
iptables -t filter -A INPUT -s 0/0 -p icmp -j DROP
- drop all incoming ICMP packets
- -t table
- -A chain (INPUT, FORWARD, OUTPUT)
- -s 0/0 addresses/mask (0 = any)
- -p protocol
- -j target (DROP, REJECT, ACCEPT)
-
What does the following iptables command do ?
iptables -t filter -A INPUT -s 0/0 -p tcp --dport 80 -j DROP
- Drop all incoming tcp traffic destine for HTTP sever on port 80
- --dport = destination port
-
What is the command to clear all iptables ?
iptables -F
-
What is the command to set iptables chain INPUT to a default policy to DROP ?
iptables -P INPUT DROP
-
What does the crontab entry do ?
1 0 * * * printf > /var/log/apache/error_log
The following line specifies that the Apache error log is to be cleared at one minute past midnight (00:01) of every day of the month, of every day of the week.
-
What does the following crontabl entry do ?
0 */2 * * * /home/username/test.pl
The following line causes the user program test.pl – ostensibly a Perl script – to be run every two hours, namely at midnight, 2am, 4am, 6am, 8am, etc...
-
Name these crontab fields:
* * * * * command to be executed
- * * * * * command to be executed
- ┬ ┬ ┬ ┬ ┬
- │ │ │ │ │
- │ │ │ │ │
- │ │ │ │ └───── day of week (0 - 7) (0 or 7 are Sunday, or use names)
- │ │ │ └────────── month (1 - 12)
- │ │ └─────────────── day of month (1 - 31)
- │ └──────────────────── hour (0 - 23)
- └───────────────────────── min (0 - 59)
-
What 2 commands check the status of the at daemon ?
- rcatd status
- /etc/init.d/atd status
-
What command will run a command getit 5 minutes in the future ?
- at now +5 minutes
- > getit
- ctrl D
-
What command checks the status of a waiting "at" command ?
atq
-
What will run a command doit at 2pm tomorrow ?
- at 2pm tomorrow
- >doit
- ctrl D
-
What is the command to remove all cron jobs ?
crontab -r
-
What is the command to show all configured cron jobs ?
crontab -l
-
What command removes an "at" job from the que?
atrm <job id>
-
What is the ifcfg-eth0 that determines if the interface uses DHCP or is manually assigned ? What are thsoe settings ?
- BOOTPROTO='static'
- BOOTPROTO='dhcp'
-
What is the command to assign eth0 a new address of 192.168.1.95 with a subnet mask of 255.255.255.0 and a broadcast address of 192.168.1.255?
ifconfig eth0 192.168.1.95 netmask 255.255.255.0 broadcast 192.168.1.255
-
What does the netstat -s command show ?
A summary of IP statistics.
-
What does the netstat -l command show ?
All open and listening sockets.
-
What is the command to create a cups login root with a password?
- lppasswd -g sys -a root
- -g <group>
- -a <login>
-
What is the url to the cups server configuration?
http://localhost:631
-
What is the shell command to send a file mytestfile.txtx to a printer HPLJ?
lp -d HPLJ mytestfile.txt
-
What is the difference in time for NTP that is considered "insane" time?
17 minutes.
-
What are three commands to one time syncronize the local server to an remote NTP provider us.pool.ntp.org ?
- ntpdate us.pool.ntp.org < depriciated
- rcntp ntptimeset <<assumes server in ntp.conf is set
- sntp -s us.pool.ntp.org
-
What is the command initially configure MySQL ?
Then start the daemon?
- mysql_install_db
- ./etc/init.d/mysql start
-
What is the command to see the MySQL version ?
mysqladmin version -p
-
What is the command to assign a password to the root user in MySQL ?
mysqladmin -u root password 'password'
-
What is the command to make a new database called customers in MySQL?
CREATE DATABASE customers;
-
Explain the options for the lp command :
-n, -m, -q
- lp:
- -n = number of copies
- -m emails confirmation to local user account
- -q sets priority
- -o landscape
- -o sides=2
-
What is the name of the CUPS configuration file ?
/etc/cupsd.conf
-
What is the command to display all information about all CUPS printers on the system ?
lpstat -t
-
What are the two possible paths for fonts installed on a Linux system ?
- /usr/share/X11/fonts
- or
- /usr/share/fonts
-
What are the two different types of scalable fonts ?
-
What command creates an index of scalable font files for X11? What file does it create ?
mkfontscale reads all of the scalable font files in the directory. For every font file found, an X11 font name (XLFD) is generated, and is written together with the file name to a file fonts.scale in the directory.
-
What command creates an index of X font files with an input file of fonts.scale?
mkfontdir
-
What firewall port need to be opened for a font server ?
7100
-
What config file need to edited to enable tcp listen for a x font servers ? What option need to be changed ?
- edit /etc/X11fs/config
- Pound out "no-listen = tcp"
-
What is the name of the daemon for X font server ?
xfs
-
What needs to be added to the xorg.conf file to enable a x font server ?
- edit /etc/X11/xorg.conf
- Add to the "files section"
- Section "Files"
- ....
- FontPath "tcp/server_address:7100"
- ....
- EndSection
-
Using the test function in bash script or [ ] explain
give the options for comparing $STRING1 and $STRING2, for both equal and not eqla.
- test "$STRING1" = "$STRING2"; echo $?
- test "$STRING1" != "$STRING2"; echo $?
-
Using the test function in bash script or [ ] explain give the options for comparing $INT1 and $INT2, for both equal and not equal, less than, greater than, greater than or equal to, less than or equal to.
- test $INT1 -eq $INT2; echo $?
- test $INT1 -ne $INT2; echo $?
- test $INT1 -lt $INT2; echo $?
- test $INT1 -gt $INT2; echo $?
- test $INT1 -ge $INT2; echo $?
- test $INT1 -le $INT2; echo $?
-
Using the test function in bash script or [ ] explain give the options for testing files:
FILE exists and is a directory?
FILE exists
FILE exists and is a regular file
FILE exists and is set-group-ID
FILE exists and is a symbolic link
FILE exists and has its sticky bit set
FILE exists and is owned by the effective user ID FILE exists and is a named pipe
FILE exists and read permission is granted
FILE exists and has a size greater than zero
FILE exists and its set-user-ID bit is set
FILE exists and write permission is granted
FILE exists and execute (or search) permission is granted
- -d exists and is a directory
- -e exists
- -f exists and is a regular file
- -g exists and is set-group-ID
- -h exists and is a symbolic link (same as -L)
- -k exists and has its sticky bit set -L
- -O exists and is owned by the effective user ID
- -p exists and is a named pipe
- -r exists and read permission is granted
- -s exists and has a size greater than zero
- -u exists and its set-user-ID bit is set
- -w exists and write permission is granted
- -x exists and execute (or search) permission is granted
-
What is the command to add a default route of 192.168.1.254?
route add default 192.168.1.25
-
What is the command to add a route to network 192.168.2.0 mask /24 to gateway 192.168.2.254?
route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.1.254
-
What is the format of an IPV6 address ?
- IPV6 addresses are composed of eight four character hexadecimal numbers separated by semi colons.
- 35BC:FA77:4898:DAFC:200C:FBBC:A007:8973
-
What are the three private IP (v4) address ranges for Class A, B and C ?
- private address ranges are :
- 10.0.0.0 - 10.255.255.255 (Class A)
- 172.16.0.0 - 172.31.255.255 (Class B)
- 192.168.0.0 - 192.168.255.255 (Class C)
-
What are the three public address ranges for Class A, B, and C ?
- Public address ranges :
- Class A 1-126.x.x.x 00000001-01111111
- Class B 128-191.x.x.x 10000000-10111111
- Class C 192-223.x.x.x 11000000-11011111
-
Explain the lpstat options, -a, -c, -p -s.
- Options for lpstat
- -a Display accepting status of printers.
- -c Display print classes.
- -p Display print status: enabled or disabled
- -s Display default printer, printers, and classes. Equivalent to -d -c -v.
-
What are the 2 commands to enable and disable cups printing ?
cupsenable and cupsdisable.
-
What is the command to view all printer ques ? for just one printer ?
- lpq or lpq -a for all printers
- lpq -p <printername> for just one
-
What are the 2 commands that remove a print job from the que. Which command and option removes all jobs ?
- lprm <job id> or cancel <jobid>
- cancel -a removes all jobs
-
What is the command to set the default printer ?
lpoptions -d <printername>
-
What are the commands to enable or disable a print que for a specific printer ?
- cupsaccept <printername>
- cupsreject <printername>
-
What the file location for the cups print que ?
/var/spool/cups
-
What is the file location of defined printers ?
/etc/cups/printers.conf
-
What is the file location of cups filters ?
/usr/lib/cups/filter
-
What is the file location of cups backend ?
/usr/lib/cups/backend
-
What is the file location of the PostScript Printer description files ?
/etc/cups/ppd
-
In the cupsd.conf file what are these options for :
ServerName, Server Admin, DocumentRoot,
LogLevel, MaxCopies, MaxJobsPerUser, User
Group, MaxClients, Browsing, BrowseAddress, BrowseAllow, BrowseDeny
- ServerName << Server Name Announced to Clients Server Admin << email address users can use to contact the CUPS administrator
- DocumentRoot << Specifies the directory where douments are located
- LogLevel << none, error , warn, info, debug, debug2 MaxCopies << limit on single print jobMaxJobsPerUser <<active jobs
- User <<user cupsd runs as
- Group << specifies the cupsd group
- MaxClients << number of connections, default is 100 Browsing << Whether cupsd advertizes BrowseAddress << Broadcast addressBrowseAllow or BrowseDeny << all none hostname.domain *.domainname IPaddress/netmask @LOCALBrowseInterval between announcements default is 30 second
-
What is the command to remove a printer from cups?
lpadmin -x <printername
-
What is the option for reverse lookup using dig ?
What does the +short otpion do ?
- dig -x 209.132.183.81 +short, abbrievates the findings to just the name :
- sethwalt@corp-suse:~> dig -x 209.132.183.81 +short
- www.redhat.com.
-
What does this command produce :
dig redhat.com mx +noall +answer centos.org ns +noall +answer
-
What variable is defined, its value is used and the values assigned to all other LC variables are not checked?
LC_ALL
-
What does the locale command do ? What are the options -a and -m used for?
- locale summarizes the current locale environment for each locale category defined by the LC_* environment variables.
- -a, --all-locales Write names of available locales.
- -m, --charmaps
-
Where are the defaults for /etc/shadow stored ?
/etc/login.defs
-
If the password of a login has "*" in /etc/shadow what does that mean ?
(*) means the account can't login
-
What is the range of UID's reserved for system accounts ?
UID's 0-499 are reserved for system accounts
-
What are the TCP and UDP ports (20, 21, 22, 23, 25, 53, 80,110, 119, 139, 143, 161, 443, 993, 995)?
- FTP 20, 21
- Open SSH 22
- Telnet 23
- SMTP 25
- DNS 53
- HTTP 80
- POP3 110
- NNTP 119 Network News Transfer protocol
- SMB and NetBIOS 139
- IMAP 143
- SNMP 161, 162
- HTTPS 443
- IMAP over TLS/SSL 993
- POP3 over TLS/SSL 995
-
What are the options for the command su, -c -l -s -m ?
- -c command to run
- -l use enviroment of new user (same as -)
- -s which shell to use
- -m preserver current environment
-
What daemon uses /etc/hosts.allow and /etc/hosts.deny ?
tcpd
-
What would you enter in the /etc/hosts.deny file to disallow all access to vsftpd ?
vsftpd : ALL
-
What would enter in the /etc/hosts.allow file to allow access for vsftpd for only 192.168.2.10 and 192.168.2.110 ?
vsftpd : 192.168.2.10,192.168.2.110
-
What is the name of the daemon that is responsible for logging kernel messages ?
klogd
-
What are the options -i, -s and -f for the command logger do ?
- -i Log the process id of the logger process with each line.
- -s Log the message to standard error, as well as the system log.
- -f file Log the specified file.
-
What is the key sequence to kill Xserver?
CTRL-ALT-BACKSPACE
-
What is the name of the tools to fine tune Xserver?
xvidtune
-
What does the .xinitrc file do ?
The xinit command uses a customizable shell script file that lists the X Client programs to start. The .xinitrc file in your home directory controls the windows and applications that start when you start x
-
What is the text base xorg configuration tool called ?
xorgconfig text based configuration utility to configure video board, monitor, resolution depth etc ...
-
What is the xorg configuration tool that creates a configuration file in root's home directory ? What is the name of the file ?
Xorg -configurecreates a hardware configuration file at /root/xorg.conf.new
-
What is the command to test an xorg config file without installing it ? If it works where should the config file be copied to ?
- X -config /root/xorg.conf.new to test it If OK
- then mv /root/xorg.conf.new /etc/X11/xorg.conf
-
What is the name of the graphical xorp config tool ?
xorgcfg - graphical version of xorgconfig
-
What is the location of the xorg config file ? Xfree86?
- for X.org /etc/X11/xorg.conf
- for XFree86 /etc/X11/XF86Config
-
In the xorg.conf file what does the option AllowMouseOpenFail do ?
Allows the system to boot even if a mouse is not found.
-
What is the Xfree86 configuration tool that creates a configuration file ? What is the location and name of the file ?
Xfree-86 -configure - detects hardware and creates a file named /etc/X11/XFConfig.new
-
What is the name of the Xfree86 text based configuration tool ?
xf86config - text based config tool
-
What is the name of the xfree86 graphical configuration tool ?
xf86cfg - graphical uitily
-
What is the name of the Redhat based x graphical configuration tool for display, keyboard, and mouse?
- Redhat
- system-config-display
- system-config-keyboard
- system-config-mouse
-
What does the xwininfo utility do ?
Xwininfo is a utility for displaying information about X windows. Various information is displayed depending on which options are selected, position, font, size etc..
-
What does the xdpyinfo utility do ?
xdpyinfo - a utility for displaying information about an X server. It is used to examine the capabilities of a server, the predefined values for various parameters used in communicating between clients and the server, and the different types of screens and visuals that are available.
-
What are the commands to stop and start the gdm display manager ?
- /etc/init.d/gdm stop * Stopping GNOME Display Manager...
- /etc/init.d/gdm start * Starting GNOME Display Manager...
-
How is the display manager greeting changed ?
- Change the display manager greeting
- edit /etc/X11/xdm/Xresources
- change entry :
- xlogin*greeting: Welcome at CLIENTHOST
-
How do you change the default color depth for the display manager xdm?
- edit /etc/X11/xdm/Xservers
- change
- :0 local /usr/bin/X -nolisten tcp -br vt7
- to
- :0 local /usr/bin/X -nolisten tcp -br vt7 -bpp 16
- restart xdm
-
What needs to be removed from the line
:0 local /usr/bin/X -nolisten tcp -br
For remote x sessions?
What file is this located in ?
What firewall port needs to opened ?
- change
- :0 local /usr/bin/X -nolisten tcp -br vt7 -bpp 16
- to
- :0 local /usr/bin/X tcp -br vt7 -bpp 16
- /etc/X11/xdm/Xservers
- open port 177
-
What is the location of the xdm, gdm and kdm configuration files ?
- /etc/X11/xdm/xdm-config
- kde and gnome can use their own
- /etc/kde/kdm or /etc/X11/kdm
- /etc/X11/gdm
-
What is the range of well known ports ?
0-1023
-
What is the range of registered ports ?
1024-49151
-
What is the range of dynamic ports ?
49152-65535
-
What port does NTP use ?
123
-
Explain NTP stepping, slewing, insane time, drift, and jitter.
- Stepping - time adjustments if the time difference is larger than 128 ms less than 17 minutes
- Slewing - gradual adjustment if the time if off by less that 128 ms
- Insane time - if the time off by more than 17 minutes it won't adjust
- Drift - measure of incidental clock frequency error. Jitter - estimated time difference between the consumer and povider since the last poll.
-
What are the two options using hwclock to set the system time from the hardware clock ?
-s or --hctosys
-
What are the two options using hwclock to set the hardware clock from the current system time?
-w or --systohc
-
What is the command to read the time from the system's hardware clock ?
hwclock -r (or --show)
-
Which loop will continue to process until the condition evaluates to False? True?
- A While loop will continue to process until the condition evaluates to false
- A Until loop will continue to process until the condition evaluates to true.
-
What are the options for ulimit, -f, -n -t , -u, -d, -m, -S, -H, and -a ?
- -f Sets a limit on the maximum size (in blocks) of files created by the shell
- -n Sets a limit on the maximum number of open file descriptors
- -t Sets a limit on the maximum amount of cpu time (in seconds) a process may use
- -u Sets a limit on the maximum number of processes available to a single user
- -d Sets a limit on the maximum size (in KB) of a process data segment in RAM
- -m Sets a limit on the maximum resident size (in KB) of a process in RAM
- -H Sets a hard resource limit -S Sets a soft resource limit
- You can use the -a option with the ulimit command to view the current value for all resource limits.
-
What is the form of the /etc/security/limits.conf file?
what is the @ used for ?
*?
- <domain> <type> <item> <value>
- Where domain can be a user login or @group name
- type is hard or soft
- item is the obect being restricted
- and value is the numerical value.
-
What are the 2 files to control access to at command ?
- /etc/at.allow << users listed in this file are allowed to use at
- /etc/at.deny << users listed in this file are not allowed to use at
-
What are the two possible command to set the timezone from the command line ?
tzselect and tzconfig
-
What does export -p do ?
When -p is specified, export shall write to the standard output the names and values of all exported variables.
-
Using the $PS1 shell variable, what does u, h and w provide?
-
What type of shell script loop will continue to process until the condition evaluates to false?
while loop : (while still true)
- while <condition> do
- <script commands>
- done
-
What type of shell script loop will continue to process until the condition evaluates to True?
until loop : (until true)
- until <condition> do
- <script commands>
- done
-
Create a script to display "monkeys-x" from 1 to 15 using a for loop.
- for i in {1..15} do
- echo "monkeys"$1
- done
-
What is the command to display numbers from 0 to 100 by increments of 5 ? 0,5,10,15 etc...
seq 0 5 100
-
What does the command "seq 16" do ?
displays numbers from 1 to 16 incremented by 1
-
What port do remote Xstations use ?
177
-
in MySQL what does the JOIN command do ?
JOIN takes data from 2 tables with same entry and display asscoiated fields.
mysql> SELECT a.tutorial_id, a.tutorial_author, b.tutorial_count -> FROM tutorials_tbl a LEFT JOIN tcount_tbl b -> ON a.tutorial_author = b.tutorial_author;+-------------+-----------------+----------------+| tutorial_id | tutorial_author | tutorial_count |+-------------+-----------------+----------------+| 1 | John Poul | 1 || 2 | Abdul S | NULL || 3 | Sanjay | 1 |+-------------+-----------------+----------------+
-
In MySQL what deos the GROUP command do ?
Organizes data by type.
- mysql> SELECT type FROM products GROUP BY type
- ;+----------+| type |+----------+| Book | | Clothing | | Music | | Toy |
-
What are the two commands needed to automate login with passphrase for SSH ?
- >ssh-agent bash
- >ssh-add ~.ssh/id_rsaenter passphrase: xxxxxxx "Identity added "
-
What command would take an input file infile and convert from ISO-8859-1 to UTF-8 and output to output file outfile?
iconv -f iso-8859-1 -t utf-8 <infile >outfile
-
What is the command to set the time and date to October 2nd 2006 6PM ?
date -s "2 OCT 2006 18:00:00"
-
What is the command to set the date to November 28th 2008 ?
date +%Y%m%d -s "20081128"
-
What is the command to set the time to 10:13 AM and 13 seconds ?
date +%T -s "10:13:13"
-
What is information is contained in /var/log/boot.log and /var/log/boot.msg ?
- boot.log entries from daemons as they were started.
- boot.msg messages displayed on screen during boot.
-
What is information is contained in /var/log/lastlog and /var/log/faillog ?
- faillog - failed authentication attempts
- lastlog - last login information
-
What is the syntax for the /etc/syslog.conf file ?
- The syntax for syslog.conf file is
- facility.priority filename
* is all
-
What is an entry to in/etc/syslog.conf to send all syslogging to a remote server at 192.11.13.15?
entry send all remotely :
*.* @192.11.13.15
-
Explain the options, -l, -u and -m for the command faillog.
- -u specify user
- -m, or --maximum Set maximum number of login failures after the account is disabled
- -l , or --lock-time Lock account to SEC seconds after failed login.
-
What is the name of the file that if present, noone can login?
/etc/nologin
-
Explain the following mail commands : t, d, u, n, e, R, r, m, q.
- mail commands:
- t <mesage number> read a message
- d <message number> delete a message
- u <message number> undelete a message
- n next
- e <message number> edit a message
- R <message number> reply
- r <message number> reply to all
- m <address> send new message
- q quit
-
What is the command to view all unread messages in your mail ?
mailq
-
What is the format of /etc/aliases
format:
alias: realemailaddress
-
Explain the options -s, -t -u for the lsof command.
- lsof - list all open files
- -s Displays file sizes.
- -t Specifies that lsof should produce terse output with process identifiers only and no header. This is useful if you are piping the output of lsof to the kill command.
- -u user_name Displays only open files associated with the specified user
-
What is the option in the /etc/sudoers file that specifies whos is allowed to run a command ?
User_Alias specifies Who is allow to run commands
-
What is the option in the /etc/sudoers file that specifies comands allowed to run ?
Cmnd_Alias the commands those users are allowed to run
-
What is the option in the /etc/sudoers file that specifies what hosts the command can be run on?
Host_Alias Hosts users are allowed to run on.
-
What is the format for the /etc/sudoers file for aliases ?
Alias_Type NAME = item1, item2, ...
-
What is the command to edit the sudoers file ?
visudo
-
What is the option in the /etc/sudoers file that specifies what login the command should be run from ?
Runas_Alias usernames commands may be run as.
-
Explain the options, -a, -i -l, -s and -r for the netstat command.
- netstat --help
- -a, --all, --listening display all sockets (default: connected)
- -i, --interfaces display interface table
- -l, --listening display listening server sockets
- -s, --statistics display networking statistics (like SNMP)
- -r, --route display routing table
-
What does the newaliases command do ?
Newaliases rebuilds the random access data base for the mail aliases file /etc/aliases. It must be run each time this file is changed in order for the change to take effect.
-
What does the /etc/X11/xdm/Xaccess file provide?
Access control file for XDMCP connections
-
What does the command do ?
ssh -N -p 22 bob@mylinuxserver.xxx -L 2110:localhost:110
- Where:
- -N= Do not execute a remote command
- -p 22= External SSH port 22.
- my home SSH serverbob@mylinuxserver.xxx= username@hostname(or ip address)
- -L 2110/localhost/110 = Bind information. Broken down as such:client-port:hostname:hostport -
In this example your binding POP3 on the server to your localhost port 2110
-
What is the location of the exim config file ?
/etc/exim/exim.conf
-
What are the options -a, -i -l, -s and -r for the netstat command ?
- netstat
- -a, --all, --listening display all sockets (default: connected)
- -i, --interfaces display interface table
- -l, --listening display listening server sockets -s, --statistics display networking statistics (like SNMP)
- -r, --route display routing tabl
-
What are the options -i, -s, -c for the ping command ?
- -i interval
- -s size
- -c count
-
What are the options -p, -i -m for traceroute ?
- -p port
- -i interface
- -m max hops
-
What is the postfix configuration file ?
/etc/postfix/main.cf
-
What is the command to find all file with the SUID bit set ?
find / -type f -perm -u=s -ls
-
What is the command to find all file with the GUID bit set ?
find / -type f -perm -g=s -ls
-
If and LC_variable has a null value what variable is then used ?
LANG
-
What file is a list of all times zones stored ?
a list of all avaialable time zones is stored in /etc/share/zoneinfo
-
What 2 files is current time zone stored in ?
current time zone : /etc/timezone or /etc/sysconfig/clock
-
What is the command to start KDE in run level 5 ? Gnome ?
- start kde = /usr/bin/startkde
- start gnome = /usr/bin/gnome
-
What is the directory for Type1 Fonts ? TrueType fonts ?
- Directory for Type 1 fonts :
- /usr/share/fonts/Type1
- TrueType :
- /usr/share/fonts/truetype
-
Which of the hidden config for X are used form run leve 3 ? runlevel 5 ?
.xinitrc
.Xsession
.Xdefaults
.Xclients
- Hidden x config files :
- .xinitrc (run level 3)
- .Xsession (run level 5)
- .Xdefaults (run level 5)
- .Xclients (run level 5)
-
Which parameter in the ifcfg-eth0 script controls when an interface is started ? What are the possible options ?
- ifcfg-eth0 : STARTMODE="auto"
- other options : onboot, manual
-
What is the command to request an interface to retrieve a DHCP IP address?
dhclient eth0 -v
-
What is the command to set a cups password ?
set a cups password : lppassword -g sys -a username
-
What is the command to set the default printer ?
lpoptions -d defaultprinter
|
|