X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Tue, 4 Oct 2011 11:44:40 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: admin privileges when logging in by ssh? Message-ID: <20111004094440.GB14728@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Sep 12 10:24, Andrew Schulman wrote: > > When a user with administrative privileges logs in to sshd, it seems that the user is only granted > > standard user privileges for that session. Is there a way around that? How can I get the admin > > privileges for that session? > > Winding this up: > > Password authentication to sshd is all that's needed to be granted the account's admin privileges on > login. I was mistaken about UAC: unlike at the console, when you log in by ssh, the account's > admin privileges are granted at login, without needing any further authentication to UAC. I'm quite puzzeled since password authentication should not be needed. This should work with pubkey as well. Please see http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-setuid-overview for a discussion how setuid works in Cygwin. In all cases, password auth and passwordless auth, you should get a full admin token. In case of password auth and in the passwordless methods 2 and 3, the OS returns a restricted token under UAC, but that token has a reference to the full admin token attached. Cygwin fetches this token and uses that when switching the user context. In the default passwordless method 1, Cygwin creates a token from scratch, which also has full admin rights. However, this token has a couple of problems as described in http://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-nopasswd1 Probably that's what you stumble over. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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