From 6f805b8cc790b2d0521bf82073b0f19a29565314 Mon Sep 17 00:00:00 2001 From: Sheppy Date: Tue, 23 May 2017 23:46:55 +0200 Subject: [PATCH] Various Additional files --- atlantislaptop/active | 19 +++++++++++ atlantislaptop/copyfiles.sh | 13 ++++++++ atlantislaptop/edurom | 20 ++++++++++++ atlantislaptop/openvpn | 36 +++++++++++++++++++++ atlantislaptop/openvpn_cip.sh | 1 + atlantislaptop/ssh_config | 54 ++++++++++++++++++++++++++++++++ atlantislaptop/stopvpn.sh | 1 + atlantislaptop/sudoers | 31 ++++++++++++++++++ herbstluftwm/hl_panel_content.py | 2 ++ zshrc | 1 + 10 files changed, 178 insertions(+) create mode 100644 atlantislaptop/active create mode 100644 atlantislaptop/copyfiles.sh create mode 100644 atlantislaptop/edurom create mode 100644 atlantislaptop/openvpn create mode 100755 atlantislaptop/openvpn_cip.sh create mode 100644 atlantislaptop/ssh_config create mode 100755 atlantislaptop/stopvpn.sh create mode 100755 atlantislaptop/sudoers diff --git a/atlantislaptop/active b/atlantislaptop/active new file mode 100644 index 0000000..24dcd35 --- /dev/null +++ b/atlantislaptop/active @@ -0,0 +1,19 @@ +wpa +wpa-peap +wpa-peap-wo-domain +wpa-psk +wpa-psk-hex +wpa2-leap +wpa2-peap +wpa2-peap-wo-domain +wep-hex +wep-passphrase +wep-shared +leap +ttls +eap +peap +peap-tkip +eap-tls +psu +edurom diff --git a/atlantislaptop/copyfiles.sh b/atlantislaptop/copyfiles.sh new file mode 100644 index 0000000..b5b9162 --- /dev/null +++ b/atlantislaptop/copyfiles.sh @@ -0,0 +1,13 @@ +CONF_DIR=~/.config/atlantislaptop + +#system config +cp $CONF_DIR/openvpn /etc/default/ +cp $CONF_DIR/ssh_config /etc/ssh/ +cp $CONF_DIR/sudoers /etc/ +cp $CONF_DIR/active /etc/wicd/encryption/templates/ +cp $CONF_DIR/edurom /etc/wicd/encryption/templates/ + +#scripts in path +cp $CONF_DIR/openvpn_cip.sh /usr/bin/ +cp $CONF_DIR/stopvpn.sh /usr/bin/ +echo "auth.txt expected in /etc/openvpn/" diff --git a/atlantislaptop/edurom b/atlantislaptop/edurom new file mode 100644 index 0000000..7cc9885 --- /dev/null +++ b/atlantislaptop/edurom @@ -0,0 +1,20 @@ +name = eduroam +author = wlan-support@rrze.fau.de +version = 1 +require identity *Identity anonymous_identity *Anonymous_identity password *Password ca_cert *Path_to_CA_Cert +----- +ctrl_interface=/var/run/wpa_supplicant +network={ + ssid="$_ESSID" + scan_ssid=$_SCAN + key_mgmt=WPA-EAP + pairwise=CCMP TKIP + group=CCMP + eap=TTLS + identity="$_IDENTITY" + anonymous_identity="$_ANONYMOUS_IDENTITY" + password="$_PASSWORD" + ca_cert="$_CA_CERT" + phase1="peaplabel=0" + phase2="auth=PAP" +} diff --git a/atlantislaptop/openvpn b/atlantislaptop/openvpn new file mode 100644 index 0000000..058107d --- /dev/null +++ b/atlantislaptop/openvpn @@ -0,0 +1,36 @@ +# This is the configuration file for /etc/init.d/openvpn + +# +# Start only these VPNs automatically via init script. +# Allowed values are "all", "none" or space separated list of +# names of the VPNs. If empty, "all" is assumed. +# The VPN name refers to the VPN configutation file name. +# i.e. "home" would be /etc/openvpn/home.conf +# +# If you're running systemd, changing this variable will +# require running "systemctl daemon-reload" followed by +# a restart of the openvpn service (if you removed entries +# you may have to stop those manually) +# +#AUTOSTART="all" +AUTOSTART="none" +#AUTOSTART="home office" +# +# WARNING: If you're running systemd the rest of the +# options in this file are ignored. +# +# Refresh interval (in seconds) of default status files +# located in /var/run/openvpn.$NAME.status +# Defaults to 10, 0 disables status file generation +# +#STATUSREFRESH=10 +#STATUSREFRESH=0 +# Optional arguments to openvpn's command line +OPTARGS="" +# +# If you need openvpn running after sendsigs, i.e. +# to let umountnfs work over the vpn, set OMIT_SENDSIGS +# to 1 and include umountnfs as Required-Stop: in openvpn's +# init.d script (remember to run insserv after that) +# +OMIT_SENDSIGS=0 diff --git a/atlantislaptop/openvpn_cip.sh b/atlantislaptop/openvpn_cip.sh new file mode 100755 index 0000000..c07de06 --- /dev/null +++ b/atlantislaptop/openvpn_cip.sh @@ -0,0 +1 @@ +openvpn --config /etc/openvpn/openfaupn.conf --auth-user-pass /etc/openvpn/auth.txt diff --git a/atlantislaptop/ssh_config b/atlantislaptop/ssh_config new file mode 100644 index 0000000..12ee7d6 --- /dev/null +++ b/atlantislaptop/ssh_config @@ -0,0 +1,54 @@ + +# This is the ssh client system-wide configuration file. See +# ssh_config(5) for more information. This file provides defaults for +# users, and the values can be changed in per-user configuration files +# or on the command line. + +# Configuration data is parsed as follows: +# 1. command line options +# 2. user-specific file +# 3. system-wide file +# Any configuration value is only changed the first time it is set. +# Thus, host-specific definitions should be at the beginning of the +# configuration file, and defaults at the end. + +# Site-wide defaults for some commonly used options. For a comprehensive +# list of available options, their meanings and defaults, please see the +# ssh_config(5) man page. + +Host * +# ForwardAgent no +# ForwardX11 no +# ForwardX11Trusted yes +# RhostsRSAAuthentication no +# RSAAuthentication yes +# PasswordAuthentication yes +# HostbasedAuthentication no +# GSSAPIAuthentication no +# GSSAPIDelegateCredentials no +# GSSAPIKeyExchange no +# GSSAPITrustDNS no +# BatchMode no +# CheckHostIP yes +# AddressFamily any +# ConnectTimeout 0 +# StrictHostKeyChecking ask + IdentityFile ~/.ssh/identity +# IdentityFile ~/.ssh/id_rsa +# IdentityFile ~/.ssh/id_dsa +# Port 22 + Protocol 2 +# Cipher 3des +# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc +# MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160 +# EscapeChar ~ +# Tunnel no +# TunnelDevice any:any +# PermitLocalCommand no +# VisualHostKey no +# ProxyCommand ssh -q -W %h:%p gateway.example.com +# RekeyLimit 1G 1h + SendEnv LANG LC_* + HashKnownHosts yes + GSSAPIAuthentication yes + GSSAPIDelegateCredentials no diff --git a/atlantislaptop/stopvpn.sh b/atlantislaptop/stopvpn.sh new file mode 100755 index 0000000..8022a50 --- /dev/null +++ b/atlantislaptop/stopvpn.sh @@ -0,0 +1 @@ +pkill openvpn diff --git a/atlantislaptop/sudoers b/atlantislaptop/sudoers new file mode 100755 index 0000000..ece9208 --- /dev/null +++ b/atlantislaptop/sudoers @@ -0,0 +1,31 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults mail_badpass +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL + +# Allow members of group sudo to execute any command +%sudo ALL=(ALL:ALL) ALL +#ik15ydit ALL=(ALL) NOPASSWD: /sys/class/backlight/intel_backlight/brightness +ik15ydit ALL=(ALL) NOPASSWD: /bin/mount +ik15ydit ALL=(ALL) NOPASSWD: /bin/umount +ik15ydit ALL=(ALL) NOPASSWD: /usr/bin/openvpn_cip.sh +ik15ydit ALL=(ALL) NOPASSWD: /usr/bin/stopvpn.sh +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/herbstluftwm/hl_panel_content.py b/herbstluftwm/hl_panel_content.py index 86358e7..54f704f 100755 --- a/herbstluftwm/hl_panel_content.py +++ b/herbstluftwm/hl_panel_content.py @@ -25,6 +25,8 @@ def color_panel(s,hex_code,seper=True): return "^fg(#" + hex_code + ") " + s + "^bg()"+sep def get_color(nr,start,end): + if nr == 88: + return hex(GREEN) if end == start or nr >= end: return hex(GREEN) else: diff --git a/zshrc b/zshrc index 59ed5f7..85c3fb2 100644 --- a/zshrc +++ b/zshrc @@ -122,6 +122,7 @@ function qfind { } alias pcolor='for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i} "; if [[ $(((($i+3)/6)*6)) -eq $(($i+3)) ]]; then echo; fi; done' alias "ipconf"="ip addr show" +alias 'vpn?'='ps -ef | grep openvpn | grep -v grep' ## General ## if [[ $HOST =~ atlantis* ]]; then