Procházet zdrojové kódy

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

Kizureina před 2 roky
rodič
revize
3ac837e2fc
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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