[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

SU



hi,
is their a way to parse a password to su command without using a module
?
why this code doesn't work ?
    open(SU,"su $user -c /usr/bin/whoami");
      while(<SU>) {}
      open(TTY,">/dev/tty");
         print TTY "$password\n";
      close(TTY);
    close(SU);
that's display the password, but still waiting for entry from terminal

thanks



[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]