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
4e4f4971
Commit
4e4f4971
authored
Nov 02, 2017
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tune_ssshd.sh: add support for run with Admin name as arg
parent
3d70b84f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
tune_sssd.sh
dc-client/tune_sssd.sh
+10
-1
No files found.
dc-client/tune_sssd.sh
View file @
4e4f4971
#!/bin/sh
# Use: ./tune_sssd.sh [AdminUser] [REALM]
fatal
()
{
echo
"
$@
"
>
&2
...
...
@@ -9,6 +11,12 @@ fatal()
epm
-q
etckeeper
||
fatal
"Install etckeeper for /etc/ before"
[
-d
/etc/.git
]
||
fatal
"initialize /etc with etckeeper init"
ADMIN
=
Administrator
if
[
-n
"
$1
"
]
;
then
ADMIN
=
"
$1
"
shift
fi
# Get REALM (needed for sssd tuning only) from DNS
REALM
=
$(
host
-t
txt _kerberos |
sed
-e
's|.*"\(.*\)".*|\1|'
)
if
[
-z
"
$REALM
"
]
;
then
...
...
@@ -21,6 +29,7 @@ if [ -z "$REALM" ] ; then
fi
echo
"Use REALM
$REALM
..."
case
$(
distr_info
-d
)
in
Ubuntu|Debian
)
# Ubuntu
...
...
@@ -131,7 +140,7 @@ fi
# Вход в домен
rm
-fv
/etc/krb5.keytab
kinit
Administrator
||
exit
kinit
$ADMIN
||
exit
echo
"Join to domain... "
net ads
join
-k
||
exit
kdestroy
...
...
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