Commit 7b299478 authored by guanghongwei's avatar guanghongwei

将shell中内容提取到配置文件中,修改base.html

parent a19a8e86
......@@ -3,7 +3,7 @@
if [ $USER = 'admin' ] || [ $USER == 'root' ];then
echo ""
else
python /opt/jumpserver/jumpserver.pyo
python /opt/jumpserver/jumpserver.py
if [ $USER == 'guanghongwei' ];then
echo
else
......
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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
......@@ -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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment