Is it possible to run a command
-
(dash) e.g. /usr/bin/echo -n foo
apache:apache
su
/sbin/nologin
?I tried:
su -s "/usr/bin/echo" -g apache apache -n foo
su: invalid option -- 'n'
. It looks like first argument may not start with dash.su -c "/usr/bin/echo -n foo" -g apache apache
nologin: invalid option -- 'c'
. It looks like -c
can't be used if login shell is /sbin/nologin
su -s /bin/bash -c "/usr/bin/echo -n foo" -g apache apache
-s /bin/bash
overrides nologin and allows to interpret value of -c
option-c "/usr/bin/echo -n foo"
allows to avoid using dash-starting first argument이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다