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.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
set 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
-
$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 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!!
-
$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
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:
deb
for binary packages ordeb-src
for 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 universe
Fix bluetooth mouse constantly disconnecting askubuntu.com
UserspaceHID=true
Power on Bluetooth adapter at startup askubuntu.com
[Policy]
AutoEnable=true
Default 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 = 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
[Nemeth][ULSAH]
SELINUX=setenforcing
SELINUXTYPE=targeted
mailhub=smtp.gmail.com:587
UseTLS=YES
UseSTARTTLS=YES
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
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=no
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