Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etersoft-admin-essentials
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etersoft-admin-essentials
Commits
75a0cbbe
Commit
75a0cbbe
authored
Feb 12, 2021
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update etersoft new scripts
parent
829d4d65
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
8 deletions
+22
-8
tune_new_system.sh
etersoft/tune_new_system.sh
+21
-7
tune_new_user_su.sh
etersoft/tune_new_user_su.sh
+1
-1
No files found.
etersoft/tune_new_system.sh
View file @
75a0cbbe
#!/bin/sh
#!/bin/sh -x
fatal
()
{
echo
"FATAL:
$*
"
>
&2
exit
1
}
# Скрипт для настройки новых машин по нашим правилам
# TODO: исключение для ARM
#if grep -q ftp.altlinux.org /etc/apt/sources.list.d/alt.list ; then
if
[
!
-r
/etc/apt/sources.list.d/etersoft.list
]
;
then
cat
/etc/apt/sources.list.d/alt.list |
sed
-e
"s|http://ftp.altlinux.org/pub/distributions|http://download.etersoft.ru/pub|"
>
/etc/apt/sources.list.d/etersoft.list
...
...
@@ -10,10 +17,10 @@ fi
echo
-n
"Checking for epm ... "
if
which epm
;
then
epm update
epm update
||
fatal
else
apt-get update
apt-get
install
eepm
||
exit
apt-get
install
eepm
||
fatal
echo
OK
fi
...
...
@@ -35,7 +42,7 @@ fi
# TODO: нужен или нет для cups?
#epm -q avahi-daemon >/dev/null && epm remove avahi-daemon
control
sudo
public
control
sudo
wheelonly
if
!
grep
"/home"
/etc/fstab |
grep
-q
nfs
;
then
cat
<<
EOF
>>/etc/fstab
...
...
@@ -47,10 +54,11 @@ fi
if
!
epm rl |
grep
-q
"LINUX@Etersoft"
;
then
epm ar etersoft
epm update
# TODO: improve for ARM
epm update
||
fatal
fi
epmi libnss-role etersoft-ca-root
epmi libnss-role etersoft-ca-root
||
fatal
# etersoft-desktop-essential-office
#/srv/lav/Projects/git-eter/etersoft-admin-essential/dc-client/tune_sssd.sh lavadmin
...
...
@@ -66,6 +74,7 @@ subst "s|# WHEEL_USERS ALL=(ALL) NOPASSWD: ALL|WHEEL_USERS ALL=(ALL) NOPASSWD: A
getent passwd user
&&
userdel user
# Подключение по ssh по Kerberos
# server side
subst
"s|^#GSSAPIAuthentication no|GSSAPIAuthentication yes|"
/etc/openssh/sshd_config
subst
"s|^#GSSAPICleanupCredentials yes|GSSAPICleanupCredentials yes|"
/etc/openssh/sshd_config
...
...
@@ -90,6 +99,11 @@ serv chronyd on
# add start range for the local users
useradd uidrange
-u
2000
-U
-M
# TODO: выключение NetworkManager для интерфейса
epmi systemd-settings-disable-dumpcore systemd-settings-enable-log-to-tty12 systemd-settings-enable-showstatus
||
fatal
serv cups on
serv cups-browsed on
# TODO: выключение NetworkManager для сетевого интерфейса
# DISABLED=yes
# NM_=no
etersoft/tune_new_user_su.sh
View file @
75a0cbbe
...
...
@@ -3,7 +3,7 @@
NU
=
"
$1
"
[
-n
"
$NU
"
]
||
exit
if
[
!
-
L
"/home
/
$NU
/Projects"
]
;
then
if
[
!
-
d
"/srv
/
$NU
/Projects"
]
;
then
mkdir
-p
/srv/
$NU
/Projects
||
exit
ln
-s
/srv/
$NU
/ /home/
$NU
/Projects
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment