admin tools Flashcards
What tool is used to install software?
rpm - Red hat package manager
what web site provides more details about rpm?
rpm.org
rpm option for applying upgrades
–upgrade
uninstall a software package
rpm –erase
find out what is installed
rpm -qa
find out where a software package is installed
get the full name of the package you are lookng for:
rpm –query –all |grep <searchtoken></searchtoken>
List all the files associated with the package install
rpm -ql rpm -q <name>
</name>
to get a complete listing of all apps installed
rpm –query –all
what command would provide a detailed list of all install applications?
rpm -qig Applications/System
- g show all groups for the provided string
- i show detailed information about each
what tells you the DHCP server being used by a linux workstation?
cat /var/lib/dhclient/dhclient-eth0.leases
what command will renew a DHCP lease?
dhclient -r
what authentication schemes are available?
using PAM (Pluggable Authentication Modules) the following can be used:
flat files
NIS
LDAP
Samba
Kerberos
What are the typical partitions on a linux server?
/ or root
/boot
/usr (program app files)
/home (user docs)
/var (system procs and logs)
/tmp
/swap (virtual memory)
how big should the swap partition be?
The swap file for virtual storage should be double the physical memory
what partition is /dev/sdb4 ?
the 4th partition on the disk with ID 2 (b)
what is used to install or remove applications?
Red Hat Package Manager RPM
how do you get a list of configuration files associated with an application?
rpm -qc <name></name>
rpm -qc bash
what command will show all apps installed with all details?
rpm -q -i –all
how do you get a list of installed shells?
rpm -qa –queryformat ‘%10{name} %20{GROUP}\n’ |grep -i shells
what is stored in the passwd file
login
encrypted password
UID
default GID
name
home directory
login shell
what appears in the passwd file if shadow passwords are being used?
an x appears in the encrypted password field in /etc/passwd
what command is used to change the system run level?
init { 0 1 2 3 4 5 6 }
0 — Halt
1 — Single-user text mode
2 — Multiuser but no NFS
3 — Full multi-user text mode
4 — Not used (user-definable)
5 — Full multi-user with X11
6 — Reboot
where are the default environment configuration template files stored?
/etc/skel
what file holds a list of available shells?
/etc/shells
what are the fields in the shadow file?
Login name
encrypted password
last passwd change
days until change allowed
days before change required
days warning for expire
days before account inactive
days before account disabled
reserved field
what are the fields in the group file?
group name
group password (optional: if set allows users to join group)
group ID
group members
(comma separated list)
what are the user management command line tools?
useradd
userdel
usermod
groupadd
groupdel
groupmod
what sh script command is used to process the files of a directory?
assuming the directory name is in the variable $SCRIPTS:
for file in ${SCRIPTS}/* do
echo ${file} blah . . . blah . . .
done
what sh command loads the current directory location value into a variable?
SCRIPTS=pwd
;export SCRIPTS
what file configures dhcp daemon?
/etc/dhcpd.conf
and any other files which the “include” statement specifies
what command checks the dhcp configuration file?
/etc/rc.d/init.d/dhcpd configtest
what cisco command enables a DHCP helper to allow DHCP requests to pass to the next network?
ip helper-address 123.456.789.1
(the ip address of the DHCP server on the other network)
must be a config entry for the router interface facing the network where the DHCP server is located.
where does a DHCP server store information about clients?
/var/lib/dhcpd/dhcpd.leases
what does the service command actually do?
it executes the specified service init script from the /etc/init.d directory with the optional action parameter supplied. Such as:
service iscnamed status
what command will list all services?
service –status-all
where are the service init script stored?
/etc/init.d
what command will restart a service?
service <service_script_name> --full-restart</service_script_name>
OR
service <service_script_name> restart</service_script_name>
which will issue a stop and then start command to the service init script
what command will show the configured status of a service at each run level?
chkconfig –list
what command can change or manage how a service is started?
chkconfig –add <name></name>
chkconfig –del <name></name>
chkconfig <name> (returns true if the service is configured to start in the current runlevel)</name>
what is auditd?
a daemon that provides the Linux Auditing System.
It provides kernel-resident logging of system calls and user space tools to collect and view the Linux system logs.
what command will show a tree of processes and their children?
pstree -A
What command is used to add or remove modules from the kernel?
mobprobe
what command will show the modules present in the kernel?
lsmod
what command can be used to copy a file between two hosts?
rcp
what command can be used to change the current user’s login shell?
chsh
what command can be used to change a file attributes and do so recursively?
chattr -R
what command can be used to split a file into specific sizes?
csplit
what command can be used to show a file’s classification or type?
file
what command will show a hexidecimal format of a file?
hexdump -C <filename></filename>
what command can be used to view the contents of a log file as it grows?
tailf
where are the PAM modules stored?
/lib/security
where are the security files for PAM stored?
/etc/security
where are the configuration files stored for PAM?
/etc/pam.d
What is contained on each line of a PAM application config file?
module_type (auth, account, session or password)
control_flag (requisite, sufficient, optional)
module_path (usually /lib/security)
what are the module_type values for PAM?
auth: prompt for a password
account: determine access based on day, location, console, etc
session: what actions to perform before or after login
password: what module allows users to change passwords