gentoo-hardened April 2012 archive
Main Archive Page > Month Archives  > gentoo-hardened archives
gentoo-hardened: Re: [gentoo-hardened] emerge via ssh doesn't wo

Re: [gentoo-hardened] emerge via ssh doesn't work

From: Sven Vermeulen <swift_at_nospam>
Date: Thu Apr 12 2012 - 19:57:25 GMT
To: gentoo-hardened@lists.gentoo.org

On Thu, Apr 12, 2012 at 03:41:50PM -0400, Alain Toussaint wrote:
> I am building a headless server and for the most part, now
> that I have labelled everything (selinux), I am not able to continue
> emerging software via ssh. I know that it is a security features but is
> there something I can change in my setup or else, I’ll need to get a
> monitor for the machine?

Without the failure you get, it is not easy to tell you what to do, but my
guess would be that, once you are logged on to the server, you are in the
staff role:
        
        ~# id -Z
        root:staff_r:staff_t
        
In order to use Portage, you need to be in the system administration role,
so first switch roles:
        
        ~# newrole -r sysadm_r
        Password: <your root password>
                
        ~# id -Z
        root:sysadm_r:sysadm_t
        
Now you should be able to run emerge (and other administrative tasks).

Wkr,
        Sven Vermeulen