Linux Config Files

From TheBeard Science Project Wiki
Jump to: navigation, search
/etc/issue - kernal info
/etc/motd - greeting message for shell
/etc/mtab - mounted devices, link of /proc/mounts. fix (rm /etc/mtab;ln -s /proc/mounts /etc/mtab)
/etc/passwd - users file
/etc/shadow - users hash file (name:password:last-mod:min:max:warn:inactive:expire:flag)
	name - login name	
	password - $1$=md5, $6$=sha512, $2a=blowfish, !=group password not available, *=disabled
	last-mod - days since password modified
	min - minimum days for password change
	max - maximum days for password change
	warn - days to warn before password expires
	inactive - days after expiration for account to be locked
	expire - expiration date in days since 1/1/1970
/etc/profile - script to run when shell is opened
/etc/bashrc - settings for non login shell
/etc/fstab - filesystem config
	<device> <mountpoint> <type> <options> 0 0
	device examples - "/dev/dsa1" or "UUID=<uuid>" or "LABEL=<label>"
	options:
		ro - read-only
		rw - read/write
		dev - interpret special devices on filesystem
		nodev - do not interpret devices
		exec - allow execute
		noexec - do not allow execute
		auto - automount
		noauto - no automount
		user - allow normal users
		nouser - root only
		guest - allow guest access
		exec - allow execute
		noexec - no execute
		suid - set uid
		nosuid - do not set uid
		sync - write as copying
		async - do not write as copying
		defaults - used defaults (rw,suid,dev,exec,auto,nouser,async)
		uid=<name or #> - set uid
		guid=<name or #> - set guid
		username=<name> = username for filesystem
		password=<pass> - password
		credentials=<file> - give credentials file instead of username and password
			format:	username=<name>
				password=<pass>
/etc/group - group config (group-name:password:group-ID:login-name-list)
/etc/hosts - IP and host name of hosts on the network
/etc/hostname - hostname of the system
/etc/services - services on the system
/etc/aliases - username aliases
/etc/sysconfig/network-scripts/ifcfg-<interface> - interface configurations
	DEVICE=<int>
	BOOTPROTO=<none/dhcp/bootp>
	ONBOOT=<yes/no> - activate on boot
	NETWORK=<addr>
	IPADDR=<addr>
	NETMASK=<mask>
	DHCP_HOSTNAME=<name> - only if dhcp server requires it (usually not)
	DNS1=<addr>
	DNS2=<addr>
	GATEWAY=<addr>
	MACADDR=<macaddr>
	SRCADDR=<addr> - source address for outgoing packets
	USERCTL=<yes/no> - yes allows non-root user control
/etc/sysconfig/network - contains network/hostname/domainname directives
	NETWORKING=<yes/no>
	HOSTNAME=<name or fqdn>
	DOMAINNAME=<name>
	GATEWAY=<addr>
	GATEWAYDEV=<interface> - use if multiple interfaces on same subnet
	NISDOMAIN=<name> - NIS domain
/etc/network/interfaces - interface configurations
	auto lo
	iface lo inet loopback
	auto eth0
	iface eth0 inet static #or dhcp
	address <addr>
	netmask <mask>
	gateway <gate>
	network <addr>
	broadcast <addr>
	dns-nameservers <addr>
	dns-search <domain>
	dns-domain <domain>
	metric <int> - metric for gateway
	hwaddress <mac>
	pre-up /path/script
	post-down /path/script
/etc/hostname - contains hostname in debian.
	run /etc/init.d/hostname.sh sets it. (it runs during boot also).
	In red hat, a line "HOSTNAME=name" may be in /etc/sysconfig/network.
	Hostname in config files must match entry in /etc/hosts.
/etc/inittab - init configurations and default runlevel
/etc/sudoers - sudoers file
	username ALL=(ALL) ALL
	%group ALL=(ALL) NOPASSWD: ALL
	%group hostname_or_ip=(as_user) OPTION:/bin/command1,/bin/command2 arg,/bin/command3
/etc/cups/printers.conf - printers
/etc/cups/cupsd.conf - cups daemon config
/usr/share/cups/model - directory containing ppd files
/etc/samba/smbusers - smb users
/etc/samba/smbpasswd - smb passwords (sometimes in different location)
/etc/yum.conf - yum configuration
/etc/yum.repos.d/*.repo - files containing repos
/etc/yum/yum-updatesd.conf - yum-updatesd config
/etc/logrotate.conf - logrotate config
/etc/resolv.conf - dns config
/etc/httpd/conf - directory of config files for apache
/etc/named.conf - BIND DNS config
/etc/bind - BIND config folder in Debian
/etc/rndc.key AND /etc/rndc.conf - name authentication for BIND
/etc/vsftpd/vsftpd.conf
/etc/grub.d/05_debian_theme - The WALLPAPER line controls grub background
/etc/default/grub - grub config. GRUB_CMDLINE_LINUX_DEFAULT line controls splash screen. ="quiet splash" OR ="". use update-grub.
/etc/modules - default modules (sometimes modules.conf)
/etc/modprobe.d/blacklist.conf - module blacklist
/etc/logrotate.conf - log rotation config
/etc/exports - contains directories available in NFS
/etc/default/tftpd-hpa - configuration for tftpd
/etc/ssh/ssh_config - ssh config
/etc/xinetd.conf
/etc/xinetd.d - directory containing files named after daemons run by xinetd. file contains line like "disable = no"
/selinux
/etc/selinux/config
~/.ssh - ssh user files
/etc/ssh/ssh_known_hosts - hosts known to ssh
~/.local/share/Trash - trash directory
~/.config/chromium/Default - chromium config
~/.config/google-chrome/Default - chrome config
~/.gnome2/nautilus-scripts/ - place scripts in this directory to make them available in context menu
	when you right-click file(s), the URI(s) of the file(s) are put in a variable called $NAUTILUS_SCRIPT_SELECTED_URIS

/etc/rc.d/ - init scripts and config
	can put scripts in init.d then put link in /etc/rc.d/rcX.d where X is the runlevel at which the scripts will be run.
	links in rcX.d have a K (kill) or S (start) then a number for the order in which to start/kill. ie S04httpd
	rc.local - custom startup script. run commands in background so they dont hang up the boot process.
	/etc/init.d is link of /etc/rc.d/init.d
	
/proc - numbered directories pertain to job numbers
/proc/net/arp - arp table
/var/cache/apt/archives - deb package dump
/etc/apt/sources.list - deb repo list
/var/cache/yum - yum cache
/var/lib/tftpboot - default directory for tftpd

/boot/grub/grub.conf - grub configuration file
/boot/grub/menu.lst - some boot configurations.
	kernel line options:
		single - single user mode
		rhgb - run kernel splash
		quiet
		splash
		nosplash
		verbose
		nomodeset
		vga=XXX -  change screen resolution according to table
		Colours   640x480 800x600 1024x768 1280x1024 1600x1200
		--------+---------------------------------------------
		256     |   769     771      773      775       796
		32,768  |   784     787      790      793       797
		65,536  |   785     788      791      794       798
		16.8M   |   786     789      792      795       799

runlevels:
	0 halt
	1 1user text
	2 multiuser text
	3 multiuser text, network
	4 user defined
	5 multiuser with x
	6 reboot

/usr/share/mdm/themes/ - login screen themes for Mate (mdm)
/usr/share/backgrounds/linuxmint/default_background.jpg - background for lock screen on mint