Is there a way of finding if the current user executing the application is an Administrator?
I looked around http://golang.org/pkg/os/user/ and couldn't find anything about Permissions.
Is there a way of finding if the current user executing the application is an Administrator?
I looked around http://golang.org/pkg/os/user/ and couldn't find anything about Permissions.
This is more of an OS specific question. I assume you are talking about Windows so I looked up: http://support.microsoft.com/kb/243330
This says that the SID of administrators is: 'S-1-5-32-544'. This means that the user.Gid will be that value if in group Administrators.
Also there seems to be a special System Administrator SID of S-1-5-21domain-500.