This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Root/Administrator privileges from cygwin terminal


On 10/15/2013 15:55, someone at kosowsky.org wrote:
    programs like 'regedit' just hang.

There is a known incompatibility between Cygwin and interactive native Win32 console mode programs. (e.g. regedit, ftp...) The Cygwin developers know about it and are likely thinking about ways to fix it.

The trick is that the incompatibility exists in order to make Cygwin programs work better with each other. Therefore, if you can find a Cygwin way to do what you're after, you will avoid these problems.

In the case of the registry, use either regtool(1) or /proc/registry:

    http://goo.gl/kOjlkt

    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?

That's the method I use, too.

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\>") ]]

The Windows security system is vastly more complicated than what you find on *ix systems. Administrator really isn't equivalent to POSIX root. The default Administrator login in Windows simply has a default set of capabilities that gives it a limited root-like set of powers. You can turn another user into an Administrator equivalent -- or a user with even more power! -- piece by piece.

Therefore, there won't be a single command that tells you if you have root-like privileges. You'd have to test for the bag-o-features you need.

--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]