Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
7b299478
Commit
7b299478
authored
Aug 15, 2014
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
将shell中内容提取到配置文件中,修改base.html
parent
a19a8e86
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
16 additions
and
17 deletions
+16
-17
jumpserver.sh
jumpserver.sh
+1
-1
test.log
logs/test.log
+0
-0
shell.conf
shell.conf
+3
-0
sudoadd.sh
sudoadd.sh
+2
-1
sudodel.sh
sudodel.sh
+2
-2
useradd.sh
useradd.sh
+5
-4
userdel.sh
userdel.sh
+3
-3
base.html
webroot/AutoSa/templates/base.html
+0
-6
No files found.
jumpserver.sh
View file @
7b299478
...
...
@@ -3,7 +3,7 @@
if
[
$USER
=
'admin'
]
||
[
$USER
==
'root'
]
;
then
echo
""
else
python /opt/jumpserver/jumpserver.py
o
python /opt/jumpserver/jumpserver.py
if
[
$USER
==
'guanghongwei'
]
;
then
echo
else
...
...
logs/test.log
0 → 100644
View file @
7b299478
shell.conf
View file @
7b299478
...
...
@@ -2,5 +2,7 @@
host
=
127
.
0
.
0
.
1
ldapassword
=
VNLqNCjpNBIetEoCA2h3
domain
=
dianping
suffix
=
com
#host2=172.16.2.74
#
host2_port
=
2001
\ No newline at end of file
sudoadd.sh
View file @
7b299478
...
...
@@ -29,4 +29,4 @@ fi
sed
-e
"s@guanghongwei@
$username
@g"
${
sudo_file
}
>
$user_sudo_file
ldapadd
-x
-h
${
host
}
-w
${
ldapassword
}
-D
"cn=admin,dc=
yolu,dc=com
"
-f
$user_sudo_file
ldapadd
-x
-h
${
host
}
-w
${
ldapassword
}
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-f
$user_sudo_file
\ No newline at end of file
sudodel.sh
View file @
7b299478
...
...
@@ -15,4 +15,4 @@ if [ $? == '0' ];then
else
echo
"
$username
is not exist."
fi
ldapdelete
-x
-h
$host
-D
"cn=admin,dc=yolu,dc=com"
-w
$ldapassword
"cn=
$username
,ou=Sudoers,dc=yolu,dc=com"
\ No newline at end of file
ldapdelete
-x
-h
$host
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-w
$ldapassword
"cn=
$username
,ou=Sudoers,dc=
$domain
,dc=
$suffix
"
\ No newline at end of file
useradd.sh
View file @
7b299478
...
...
@@ -31,8 +31,8 @@ cd /usr/share/migrationtools/
./migrate_passwd.pl /etc/passwd
>
/tmp/passwd.ldif
./migrate_group.pl /etc/group
>
/tmp/group.ldif
grep
-A15
"dn: uid=
$username
,ou=People,dc=
yolu,dc=com
"
/tmp/passwd.ldif
>
/tmp/user.ldif
grep
-A6
"dn: cn=
$username
,ou=Group,dc=
yolu,dc=com
"
/tmp/group.ldif
>
/tmp/usergroup.ldif
grep
-A15
"dn: uid=
$username
,ou=People,dc=
$domain
,dc=
$suffix
"
/tmp/passwd.ldif
>
/tmp/user.ldif
grep
-A6
"dn: cn=
$username
,ou=Group,dc=
$domain
,dc=
$suffix
"
/tmp/group.ldif
>
/tmp/usergroup.ldif
ldapadd
-x
-h
$host
-w
$ldapassword
-D
"cn=admin,dc=
yolu,dc=com
"
-f
/tmp/user.ldif
ldapadd
-x
-h
$host
-w
$ldapassword
-D
"cn=admin,dc=
yolu,dc=com
"
-f
/tmp/usergroup.ldif
ldapadd
-x
-h
$host
-w
$ldapassword
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-f
/tmp/user.ldif
ldapadd
-x
-h
$host
-w
$ldapassword
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-f
/tmp/usergroup.ldif
\ No newline at end of file
userdel.sh
View file @
7b299478
...
...
@@ -17,6 +17,5 @@ if [ $? == '0' ];then
else
echo
"
$username
is not exist."
fi
ldapdelete
-x
-h
$host
-D
"cn=admin,dc=yolu,dc=com"
-w
$ldapassword
"uid=
$username
,ou=People,dc=yolu,dc=com"
ldapdelete
-x
-h
$host
-D
"cn=admin,dc=yolu,dc=com"
-w
$ldapassword
"cn=
$username
,ou=Group,dc=yolu,dc=com"
ldapdelete
-x
-h
$host
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-w
$ldapassword
"uid=
$username
,ou=People,dc=
$domain
,dc=
$suffix
"
ldapdelete
-x
-h
$host
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-w
$ldapassword
"cn=
$username
,ou=Group,dc=
$domain
,dc=
$suffix
"
\ No newline at end of file
webroot/AutoSa/templates/base.html
View file @
7b299478
...
...
@@ -27,7 +27,6 @@
<li
class=
"{{ index }}"
><a
href=
"/"
>
主页
</a></li>
<li
class=
"{{ pass_menu }}"
><a
href=
"/chgPass/"
>
密码管理
</a></li>
<!--<li><a href="#">命令执行</a></li>-->
<li
class=
"{{ vpn_menu }}"
><a
href=
"/chgPptp/"
>
VPN管理
</a></li>
</ul>
<div
class=
"btn-group navbar-right"
>
<button
type=
"button"
class=
"btn btn-primary dropdown-toggle session_btn"
data-toggle=
"dropdown"
>
...
...
@@ -53,11 +52,6 @@
<li><a
href=
"/chgPass/"
><i
class=
"glyphicon glyphicon-send"
></i>
登陆密码
</a></li>
<li><a
href=
"/chgKey/"
><i
class=
"glyphicon glyphicon-send"
></i>
密钥密码
</a></li>
</ul>
<div
class=
"menu-first"
><a
href=
"#monitorMenu"
data-toggle=
"collapse"
><i
class=
"glyphicon glyphicon-th"
></i>
VPN管理
</a></div>
<ul
id=
"monitorMenu"
class=
"nav nav-list navbar-collapse.in menu-second"
>
<li><a
href=
"/chgPptp/"
><i
class=
"glyphicon glyphicon-send"
></i>
PPTP密码
</a></li>
<li><a
href=
"/chgOpenvpn/"
><i
class=
"glyphicon glyphicon-send"
></i>
OpenVPN
</a></li>
</ul>
</div>
</div>
</div>
...
...
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