-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
96 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
|
||
# Unlimited use with this notice. (C) 2004-2018 George Georgalis <george@galis.org> | ||
# (c) 2004-2022 George Georgalis <george@galis.org> unlimited use with this notice | ||
|
||
Copyright and use license are stored in respective files of this repo. In cases | ||
where they are not and you require them, apply this file. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/sh | ||
|
||
# REQUIRE: time | ||
# BEFORE: etc | ||
# PROVIDE: hostroot | ||
# KEYWORD: cos7-boot | ||
|
||
set -e | ||
|
||
chkerr () { [ "$*" ] && { stderr ">>> $* <<<" ; return 1 ;} || true ;} #:> err stderr args return 1, noop if null | ||
|
||
[ -e /root/root.pub ] || chkerr "It only makes sense to run this if we have a root pub key ready..." | ||
|
||
install -m 755 -o root -g wheel -d /etc/ssh/auth | ||
install -m 644 -o root -g wheel /root/root.pub /etc/ssh/auth/ | ||
mv /root/root.pub /root/root.pub~ | ||
|
||
##:: Reconfigure sshd to allow root login and disallow password authentication. | ||
[ -e /etc/ssh/sshd_config-orig ] || cp -p /etc/ssh/sshd_config /etc/ssh/sshd_config-orig | ||
sed ' | ||
s/.*PermitRootLogin.*/PermitRootLogin yes/ | ||
s/.*PasswordAuthentication.*/PasswordAuthentication no/ | ||
s/.*UsePam.*/UsePam no/ | ||
s=.*AuthorizedKeysFile.*=AuthorizedKeysFile /etc/ssh/auth/%u.pub= | ||
' /etc/ssh/sshd_config >/etc/ssh/sshd_config-tmp \ | ||
&& mv /etc/ssh/sshd_config-tmp /etc/ssh/sshd_config | ||
|
||
systemctl enable sshd || true | ||
systemctl stop sshd || true | ||
systemctl start sshd | ||
# systemctl status sshd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# REQUIRE: yum-epel | ||
# BEFORE: | ||
# PROVIDE: yum-desktop | ||
# KEYWORD: cos7 | ||
|
||
set -e | ||
|
||
yum -y groupinstall Xfce | ||
yum -y install xrdp xterm firefox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
|
||
# REQUIRE: | ||
# BEFORE: | ||
# PROVIDE: yum-epel | ||
# KEYWORD: cos7 | ||
|
||
set -e | ||
|
||
yum install epel-release -y | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
# REQUIRE: | ||
# BEFORE: | ||
# PROVIDE: yum-main | ||
# KEYWORD: cos7 | ||
|
||
set -e | ||
|
||
yum -y install fping mtr ndjbdns net-tools nmap rsync telnet lua | ||
yum -y install bc gnupg2 lsof rcs tmux vim-enhanced yum-utils git | ||
|
||
yum -y install gnuplot rrdtool units aspell | ||
|
||
yum -y groupinstall development | ||
yum -y install ShellCheck | ||
# npm nodejs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
# REQUIRE: | ||
# BEFORE: | ||
# PROVIDE: yum-min | ||
# KEYWORD: cos7 | ||
|
||
set -e | ||
|
||
yum -y install fping mtr ndjbdns net-tools nmap rsync telnet lua | ||
yum -y install bc gnupg2 lsof rcs tmux vim-enhanced yum-utils git | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
# ~/.bash_profile | ||
|
||
# Unlimited use with this notice (c) George Georgalis <george@galis.org> | ||
# (c) 2006-2022 George Georgalis <george@galis.org> unlimited use with this notice | ||
|
||
# Get the aliases and functions | ||
if [ -f ~/.bashrc ]; then | ||
. ~/.bashrc | ||
fi | ||
# source any legacy rc | ||
test -e ~/.bashrc && . ~/.bashrc || true | ||
|
||
# User specific environment and startup programs | ||
|
||
[ -e "$HOME/.profile" ] && . "$HOME/.profile" | ||
# source root env | ||
test -e ~/.profile && . ~/.profile | ||
|
||
# no further env setup here. |