Root/Administrator privileges from cygwin terminal
cygwin@kosowsky.org
cygwin@kosowsky.org
Tue Oct 15 21:55:00 GMT 2013
I have 2 questions regarding root/administrator
privileges but have not been able to find any clear answers via googling.
1. Is it possible to run a command (including potentially a new bash
shell) as Administrator/root (Group 544) from a non-administrator bash
shell?
Note that using windows 'runas' fails since it won't read a
password from bash stdin. Also, I couldn't find any cygwin sudo.
Also, while 'ssh localhost' seems to give me root(0) and
Administrators (544) group privileges (when running id -a), it
doesn't give me console access so programs like 'regedit' just
hang.
The only solution I have now is to open a new bash window as administrator.
So is there a way to elevate (or change) privileges from with a bash shell?
2. Is there any better way to determine that one has Administrator
privileges than to run something like:
id -G | grep -Eq '<\544\>'
Or:
[[ `id -G` =~$(echo "\<544\>") ]]
(note the 'echo' is used to get around incompatibilities in
various versions of bash on how word separators are recognize.)
--
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