Compare commits
10 Commits
9fa560e5c2
...
0cfb4bc2be
Author | SHA1 | Date | |
---|---|---|---|
0cfb4bc2be | |||
930deb1349 | |||
|
891d6cd73f | ||
|
bbc8d97422 | ||
|
746d326356 | ||
4026106afb | |||
|
5965fc742f | ||
a11b2b60c7 | |||
179eac4dc6 | |||
f7fa5afce2 |
1
authorized_keys/dictxiong/ltp1-bd
Normal file
1
authorized_keys/dictxiong/ltp1-bd
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKhS4voo3K/Dvzqckr0bouO1WkCI5XxswstHWnuuyKBz ltp1-bd
|
1
authorized_keys/dictxiong/pc1
Normal file
1
authorized_keys/dictxiong/pc1
Normal file
|
@ -0,0 +1 @@
|
||||||
|
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHLYgVj+NPino6sOmahULN7SbAMaVAgzqPfDjz2S8zDv pc1
|
|
@ -8,6 +8,8 @@ adduser \
|
||||||
--gecos "jumpserver user ssh" \
|
--gecos "jumpserver user ssh" \
|
||||||
ssh
|
ssh
|
||||||
|
|
||||||
|
usermod -p '*' ssh
|
||||||
|
|
||||||
insert_if_not_exist()
|
insert_if_not_exist()
|
||||||
{
|
{
|
||||||
filename=$1
|
filename=$1
|
||||||
|
@ -18,6 +20,6 @@ insert_if_not_exist()
|
||||||
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_if_not_exist "/etc/crontab" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh"
|
insert_if_not_exist "/etc/crontabs/root" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/jumpserver_cron.sh"
|
||||||
|
|
||||||
"$THIS_DIR"/jumpserver_cron.sh
|
"$THIS_DIR"/jumpserver_cron.sh
|
||||||
|
|
3
scripts/nasp
Executable file → Normal file
3
scripts/nasp
Executable file → Normal file
|
@ -1,4 +1,5 @@
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/bin/docker
|
%nasp ALL = (root) NOPASSWD: /usr/bin/docker
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/sbin/reboot
|
%nasp ALL = (root) NOPASSWD: /usr/sbin/reboot
|
||||||
%nasp ALL = (root) NOPASSWD: /usr/bin/whoami
|
%nasp ALL = (root) NOPASSWD: /usr/bin/whoami
|
||||||
|
%nasp ALL = (root) NOPASSWD: /usr/bin/nvidia-smi
|
||||||
|
%nasp ALL = (root) NOPASSWD: /usr/sbin/shutdown
|
||||||
|
|
|
@ -15,6 +15,6 @@ insert_if_not_exist()
|
||||||
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
grep -qxF -- "$line" "$filename" || echo "$line" >> "$filename"
|
||||||
}
|
}
|
||||||
|
|
||||||
insert_if_not_exist "/etc/crontab" "*/5 * * * * cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/testbed_cron.sh"
|
insert_if_not_exist "/etc/crontab" "*/5 * * * * root cd \"$THIS_DIR\" && git pull && \"$THIS_DIR\"/testbed_cron.sh"
|
||||||
|
|
||||||
"$THIS_DIR"/testbed_cron.sh
|
"$THIS_DIR"/testbed_cron.sh
|
||||||
|
|
Loading…
Reference in New Issue
Block a user