diff --git a/jumpserver.sh b/jumpserver.sh index 57a3b4e9b..42afe65ec 100644 --- a/jumpserver.sh +++ b/jumpserver.sh @@ -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 diff --git a/logs/test.log b/logs/test.log new file mode 100644 index 000000000..e69de29bb diff --git a/shell.conf b/shell.conf index aa348d7eb..e87fa28e1 100644 --- a/shell.conf +++ b/shell.conf @@ -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 diff --git a/sudoadd.sh b/sudoadd.sh index ae8da664e..190d0d952 100644 --- a/sudoadd.sh +++ b/sudoadd.sh @@ -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 diff --git a/sudodel.sh b/sudodel.sh index 294a30852..e1cd090bf 100644 --- a/sudodel.sh +++ b/sudodel.sh @@ -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 diff --git a/useradd.sh b/useradd.sh index 68d2b5cdd..481dc10b7 100644 --- a/useradd.sh +++ b/useradd.sh @@ -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 diff --git a/userdel.sh b/userdel.sh index 51eefe7c6..6db0b83c5 100644 --- a/userdel.sh +++ b/userdel.sh @@ -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 diff --git a/webroot/AutoSa/templates/base.html b/webroot/AutoSa/templates/base.html index a94da5a56..aebc58d03 100644 --- a/webroot/AutoSa/templates/base.html +++ b/webroot/AutoSa/templates/base.html @@ -27,7 +27,6 @@
  • 主页
  • 密码管理
  • -
  • VPN管理