Browse Source

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

Kizureina 2 years ago
parent
commit
3ac837e2fc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      init.d/Tomcat-init

+ 1 - 1
init.d/Tomcat-init

@@ -86,7 +86,7 @@ stop() {
 }
 
 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
       echo "1"
     else