Configs - jasper-zanjani/dotfiles GitHub Wiki
aliases
anacrontab
cmd.allow
cmd.deny
crontab
files.dns
fstab
group
hostname
hosts
inittab
ld.so.conf
lightdm.conf
login.defs
logrotate.conf
lsb-release
modprobe.conf
mtab
network
nsswitch.conf
passwd
resolv.conf
services
shadow
sudoers
xinetd.conf
yum.conf
ansible
[ansible.conf][/etc/ansible/ansible.conf]
apt
sources.list
bluetooth
input.conf
main.conf
mail
sendmail.cf
sendmail.mc
rc.d
rc.sysinit
sysconfig
desktop
iptables
network-scripts/
lvm
[.cache][/etc/lvm/.cache]
postfix
main.cf
samba
smb.conf
selinux
config
ssmtp
ssmtp.conf
syslog-ng
syslog-ng.conf
udev
hwdb.bin
.bashrc
.forward
.mailrc
.vimrc
xorg.conf
.gnupg
pubring.gpg
.ssh
known_hosts
local/lib/systemd/system/
share/config/kdm/kdmrc
share/hwdata/pci.ids.gz
share/hwdata/pci.ids
share/lightdm/lightdm.conf.d/
log/audit/audit.log
log/dmesg
spool/cron/
Creating a service file ref
[Unit]
Description=Runs /usr/local/bin/mystartup.sh
[Service]
ExecStart=/usr/local/bin/mystartup.sh
[Install]
WantedBy=multi-user.target| Directive | Effect |
|---|---|
@hourly |
equivalent to 0 * * * *
|
@midnight @daily
|
equivalent to 0 0 * * *
|
@weekly |
equivalent to 0 0 * * 0
|
@monthly |
equivalent to 0 0 1 * *
|
@annually @yearly
|
equivalent to 0 0 1 1 *
|
@reboot |
run at startup |
Run /root/backup.sh at 0300 everyday
0 3 * * * /root/backup.shRun /path/to/script.sh at 16:30 on the 2nd of every month
30 16 2 * * /path/to/script.shRun /scripts/phpscript.php at 22:00 every weekday
0 22 * * 1-5 /scripts/phpscript.phpRun /path/to/perlscript.pl at 00:23, 02:23, and 04:23 everyday
23 0-23/2 * * * /path/to/perlscript.plRun linuxcommand at 04:05 every Sunday
5 4 * * sun /path/to/linuxcommandset sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"/etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.6 LTS"/etc/yum.conf Exclude packages from updates permanently 38
[main]
exclude=kernel* php*Colon-delimited file containing password hashes for every user listed in /etc/passwd
$USERNAME:$PASSWORD:$LASTCHANGED:$MIN:$MAX:$WARN:$INACTIVE:$EXPIRE
-
$USERNAMELogin name -
$PASSWORDEncrypted password; dollar signs delimit encryption hash function ($1,$2a,$2y,$5, or$6), then salt, then hash value. After locking the account withusermod -L, an exclamation point!is placed in front of this field, making the password inoperable and locking the account. When an account has not yet had a password set, this value is!! -
$LASTCHANGEDDays since 01/01/1970 that password was last changed -
$MINminimum number of days required between password changes -
$MAXmaximum number of days the password is valid before user is forced to change password -
$WARNnumber of days the password is to expire that user is warned that password must be changed -
$INACTIVEnumber of days after password expires that account is disabled -
$EXPIREdays since 01/01/1970 that account is disabled
Colon-delimited file describing group membership
$GROUP:$PASSWORD:$GID:$USER1:$USER2:$USER3...
/etc/resolv.conf Use DNS queries prior to consulting /etc/hosts
nameserver dns
nameserver files/etc/apt/sources.list
Entries are made of three parts, delimited by whitespace: kali.training
- Source type:
debfor binary packages ordeb-srcfor source packages - Base URL of the source: beginning with
http://,ftp://,file://, or evencdrom: - Name of the chosen distribution followed by sections that differentiate packages by license. Kali, for example, contains
main,non-free, andcontrib.
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ bionic-updates universe
# MongoDB repo
deb [ arch=amd64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse
# gcloud
deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main
# "Trusty-security" repository containing `mailx`
deb http://security.ubuntu.com/ubuntu trusty-security main universeFix bluetooth mouse constantly disconnecting askubuntu.com
UserspaceHID=truePower on Bluetooth adapter at startup askubuntu.com
[Policy]
AutoEnable=trueDefault values for account creation. Properties: EXPIRE, GROUP, HOME, INACTIVE, SHELL, SKEL
Configure Samba ref
[samba-share]
comment = Samba on Ubuntu
path = /samba
read only = no
browsable = yesConfigure anonymous unsecured file sharing on a shared directory [41]
[global]
workgroup = WORKGROUP
netbios name = rhel
security = user
...
[Anonymous]
comment = Anonymous File Server Share
path = /srv/samba/anonymous
browsable =yes
writable = yes
guest ok = yes
read only = no
force user = nobody[Nemeth][ULSAH]
SELINUX=setenforcing
SELINUXTYPE=targetedmailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YESAllow sudo access to user linuxize only for command /bin/mkdir
linuxize ALL=/bin/mkdir
Allow user linuxize to run sudo commands without authenticating himself
linuxize ALL=(ALL) NOPASSWD: ALL
Change timeout to 10 minutes
Defaults timestamp_timeout=10
Change timeout to 10 minutes only for user linuxize
Defaults:linuxize timestamp_timeout=10
Specify desktop environment and display manager on Red Hat.
DESKTOP="KDE"
DISPLAYMANAGER="KDE"DESKTOP="XFCE"
DISPLAYMANAGER="XDM"DESKTOP="Gnome"
DISPLAYMANAGER="GDM"Directory containing file configurations for each network device you may have or want to add on your system ref
DEVICE=eth0
IPADDR=208.164.186.1
NETMASK=255.255.255.0
NETWORK=208.164.186.0
BROADCAST=208.164.186.255
ONBOOT=yes
BOOTPROTO=none
USERCTL=noPostfix config
Set e-mail domain name [Eckert][Eckert]
mydomain = sample.comSet local access to domain name [Eckert][Eckert]
myorigin = $mydomainConfigure postfix to listen for email on all interfaces [Eckert][Eckert]
inet_interfaces = allConfigure destination domain for email [Eckert][Eckert]
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomainTrust email from computers on the local network [Eckert][Eckert]
mynetworks_style = class