瀏覽代碼

Add a judgment on whether the tomcat-user is set to be unable to log in

Kizureina 2 年之前
父節點
當前提交
3ac837e2fc
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      init.d/Tomcat-init

+ 1 - 1
init.d/Tomcat-init

@@ -86,7 +86,7 @@ stop() {
 }
 }
 
 
 user_exists() {
 user_exists() {
-  if [ "`cat /etc/passwd | grep ftp | cut -d ":" -f7 | cut -d "/" -f4`" = "nologin" ]; then
+  if [ "`cat /etc/passwd | grep www | cut -d ":" -f7 | cut -d "/" -f4`" = "nologin" ]; then
     if id -u $1 >/dev/null 2>&1; then
     if id -u $1 >/dev/null 2>&1; then
       echo "1"
       echo "1"
     else
     else