su problem

Sami Halabi sodynet1 at gmail.com
Tue Jun 12 13:29:36 UTC 2012


%su -m root -c 'cd /etc/ssh/ && sed -i .bak -e "s/PermitRootLogin
no/PermitRootLogin yes/"'
Password:
load: 0.00  cmd: su 42619 [ttydcd] 3.20r 0.00u 0.00s 0% 2088k

:(
I think there is no good solution but driving to the machine itself...

Sami

On Tue, Jun 12, 2012 at 4:10 PM, Damien Fleuriot <ml at my.gd> wrote:

> On 6/12/12 3:00 PM, Oliver Fromme wrote:
> > Damien Fleuriot <ml at my.gd> wrote:
> >  > Ok so, I've read all the replies so far and I'm a bit perplexed.
> >  >
> >  > Sami, before you drive 3 hours to and 3 hours fro, kindly log in as
> sody
> >  > over SSH, then try "login" to connect *locally* as the root user.
> >
> > That won't work.  Unless you've disabled the "securetty" check
> > in /etc/pam.d/login, but it is there for a reason.
> >
> > Best regards
> >    Oliver
> >
>
>
> Aw :(
>
>
> With a bit of luck, anything that would just start a command without
> trying for an actual shell ?
>
> Perhaps su -m root -c 'cd /etc/ssh/ && sed -i .bak -e "s/PermitRootLogin
> no/PermitRootLogin yes/"' ?
>
> That way he could toggle remote root logins.
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>



-- 
Sami Halabi
Information Systems Engineer
NMS Projects Expert
FreeBSD SysAdmin Expert


More information about the freebsd-stable mailing list