equivalent to su or sudo?
David Rothenberger
daveroth@acm.org
Sat Aug 18 03:50:00 GMT 2018
Ulli Horlacher wrote:
> I need to run some scripts with full administrator rights (for chown,
> chmod, setfacl).
> Is there a cygwin equivalent to su or sudo?
>
I use the following shell script to start a command as Administrator. I mainly just use it to start mintty.
#!/bin/bash
cmd="$(cygpath -da "$1")"; shift
if [ $# -gt 0 ]; then
powershell Start-Process "$cmd" -ArgumentList \""$@"\" -Verb RunAs -WindowStyle Hidden
else
powershell Start-Process "$cmd" -Verb RunAs -WindowStyle Hidden
fi
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list