Configs - jasper-zanjani/dotfiles GitHub Wiki

/etc

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

ssh ssh_config sshd_config

sysconfig desktop iptables network-scripts/

lvm [.cache][/etc/lvm/.cache]

postfix main.cf

samba smb.conf

selinux config

skel

ssmtp ssmtp.conf

syslog-ng syslog-ng.conf

systemd/system

udev hwdb.bin

/home

.bashrc .forward .mailrc .vimrc xorg.conf .gnupg pubring.gpg .ssh known_hosts

/usr

local/lib/systemd/system/ share/config/kdm/kdmrc share/hwdata/pci.ids.gz share/hwdata/pci.ids share/lightdm/lightdm.conf.d/

/var

log/audit/audit.log log/dmesg spool/cron/

/lib

systemd/system/

Boot

/boot/grub/grub.cfg

SystemD service files

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
crontab
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.sh

Run /path/to/script.sh at 16:30 on the 2nd of every month

30 16 2 * * /path/to/script.sh

Run /scripts/phpscript.php at 22:00 every weekday

0 22 * * 1-5 /scripts/phpscript.php

Run /path/to/perlscript.pl at 00:23, 02:23, and 04:23 everyday

23 0-23/2 * * * /path/to/perlscript.pl

Run linuxcommand at 04:05 every Sunday

5 4 * * sun /path/to/linuxcommand

/home/$USER

/home/$USER/.mailrc
set sendmail="/usr/bin/msmtp"
set message-sendmail-extra-arguments="-a gmail"

/etc

/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*
/etc/shadow

Colon-delimited file containing password hashes for every user listed in /etc/passwd

$USERNAME:$PASSWORD:$LASTCHANGED:$MIN:$MAX:$WARN:$INACTIVE:$EXPIRE
  • $USERNAME Login name
  • $PASSWORD Encrypted password; dollar signs delimit encryption hash function ($1, $2a, $2y, $5, or $6), then salt, then hash value. After locking the account with usermod -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 !!
  • $LASTCHANGED Days since 01/01/1970 that password was last changed
  • $MIN minimum number of days required between password changes
  • $MAX maximum number of days the password is valid before user is forced to change password
  • $WARN number of days the password is to expire that user is warned that password must be changed
  • $INACTIVE number of days after password expires that account is disabled
  • $EXPIRE days since 01/01/1970 that account is disabled
/etc/group

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

/etc/apt/sources.list

Entries are made of three parts, delimited by whitespace: kali.training

  1. Source type: deb for binary packages or deb-src for source packages
  2. Base URL of the source: beginning with http://, ftp://, file://, or even cdrom:
  3. Name of the chosen distribution followed by sections that differentiate packages by license. Kali, for example, contains main, non-free, and contrib.
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 universe
/etc/bluetooth
/etc/bluetooth/input.conf

Fix bluetooth mouse constantly disconnecting askubuntu.com

UserspaceHID=true
/etc/bluetooth/main.conf

Power on Bluetooth adapter at startup askubuntu.com

[Policy]
AutoEnable=true
/etc/default
/etc/default/useradd

Default values for account creation. Properties: EXPIRE, GROUP, HOME, INACTIVE, SHELL, SKEL

/etc/samba
/etc/samba/smb.conf

Configure Samba ref

[samba-share]
comment = Samba on Ubuntu
path = /samba
read only = no
browsable = yes

Configure 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
/etc/selinux
/etc/selinux/config

[Nemeth][ULSAH]

SELINUX=setenforcing
SELINUXTYPE=targeted
/etc/ssmtp
/etc/ssmtp/ssmtp.conf
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES
/etc/sudoers

Allow 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
/etc/sysconfig
/etc/sysconfig/desktop

Specify desktop environment and display manager on Red Hat.

DESKTOP="KDE"
DISPLAYMANAGER="KDE"
DESKTOP="XFCE"
DISPLAYMANAGER="XDM"
DESKTOP="Gnome"
DISPLAYMANAGER="GDM"
/etc/sysconfig/network-scripts/

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=no
/etc/postfix/main.cf

Postfix config

Set e-mail domain name [Eckert][Eckert]

mydomain = sample.com

Set local access to domain name [Eckert][Eckert]

myorigin = $mydomain

Configure postfix to listen for email on all interfaces [Eckert][Eckert]

inet_interfaces = all

Configure destination domain for email [Eckert][Eckert]

mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

Trust email from computers on the local network [Eckert][Eckert]

mynetworks_style = class
⚠️ **GitHub.com Fallback** ⚠️