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
0076bf77
Commit
0076bf77
authored
Apr 06, 2015
by
Vitaly Lipatov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
script for add sandbox account
parent
d4449449
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
add_sandbox_user.sh
web/add_sandbox_user.sh
+30
-0
update_htpasswd.sh
web/sandbox/update_htpasswd.sh
+15
-0
No files found.
web/add_sandbox_user.sh
0 → 100755
View file @
0076bf77
#!/bin/sh
# $ sudo su -
USERNAME
=
$1
[
-n
"
$USERNAME
"
]
||
exit
# Добавляем пользователя
useradd
$USERNAME
# Задаём пользователю пароль
#passwd $USERNAME
PASSWORD
=
$(
pwgen
-1
-s
10 |
sed
-e
"s|[Il1Oo0]|E|g"
)
echo
"
$PASSWORD
"
| passwd
--stdin
$USERNAME
||
exit
cd
/etc/httpd2/conf/sites-enabled
||
exit
./generate.sh
$USERNAME
cd
/etc/httpd2/conf
./update_htpasswd.sh
cat
<<
EOF
sandbox access:
host: sandbox.azbyka.ru
login:
$USERNAME
passwd:
$PASSWORD
site: http://
$USERNAME
.sandbox.azbyka.ru
EOF
web/sandbox/update_htpasswd.sh
0 → 100755
View file @
0076bf77
#!/bin/sh
# Workaround against broken mod_auth_pam (works only under root)
# generate htpasswd from /etc/tcb
HTP
=
/etc/httpd2/conf/htpasswd
USERS
=
$(
cd
/home
;
echo
*
)
#echo $USERS
echo
"#Generated by
$(
realpath
$0
)
at
`
date
`
"
>
$HTP
for
u
in
$USERS
;
do
[
-s
/etc/httpd2/conf/sites-enabled/
$u
.conf
]
||
continue
cat
/etc/tcb/
$u
/shadow
>>
$HTP
done
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