Guest as root?

Technical issues/questions of an intermediate or advanced nature.
Post Reply
User avatar
n0ctilucient
Shogun
Shogun
Posts: 349
Joined: 21 Apr 2017, 15:59
Distribution: fullmoonremix
Location: 127.0.0.1
Contact:

Guest as root?

Post#1 by n0ctilucient » 04 Apr 2018, 15:19

I'm interested in opening gui frontends from the guest cmdline as root.

:unknown: ...is this doable and if so how (perhaps... su/sudo)?

Better said... what is the exact cmdline entry to run frontends as root in guest?
(I'll use the info to configure my pekWM floating menu)

Thanx in advance for any insight given. :good:
Last edited by n0ctilucient on 05 Apr 2018, 10:42, edited 1 time in total.
:hmmm: I do NOT have the "right" to tell anyone what they should do...
but I reserve the "right" to tell them what they should "consider".

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Guest as root?

Post#2 by Ed_P » 04 Apr 2018, 16:15

This works for me.

echo guest | sudo -S activate $OPTIONAL/$CHROME > /dev/null 2>&1 &

The two variables are the folder the module is in and the module file's name.
Ed

User avatar
n0ctilucient
Shogun
Shogun
Posts: 349
Joined: 21 Apr 2017, 15:59
Distribution: fullmoonremix
Location: 127.0.0.1
Contact:

Guest as root?

Post#3 by n0ctilucient » 04 Apr 2018, 22:08

Thanks... :good:

I was actually thinking along the lines of for instance... opening
a file manager as root from the "guest" cmdline as if I were superuser.
:hmmm: I do NOT have the "right" to tell anyone what they should do...
but I reserve the "right" to tell them what they should "consider".

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Guest as root?

Post#4 by Ed_P » 05 Apr 2018, 00:28

This works for my file manager.

guest@porteus:~$ echo toor | sudo -S nemo
^C
guest@porteus:~$
Ed

donald
Full of knowledge
Full of knowledge
Posts: 1363
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Guest as root?

Post#5 by donald » 05 Apr 2018, 03:50

On my system, sudo asks for the guest password
echo guest (or whatever the current password is)

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Guest as root?

Post#6 by Ed_P » 05 Apr 2018, 05:30

Actually, it does on mine also.

guest@porteus:~$ echo guest | sudo -S nemo
Password: ^C
guest@porteus:~$
Ed

User avatar
n0ctilucient
Shogun
Shogun
Posts: 349
Joined: 21 Apr 2017, 15:59
Distribution: fullmoonremix
Location: 127.0.0.1
Contact:

Guest as root?

Post#7 by n0ctilucient » 05 Apr 2018, 10:38

Thanks... :good:

It works. Now I'm cooking with fire... :thumbsup:
:hmmm: I do NOT have the "right" to tell anyone what they should do...
but I reserve the "right" to tell them what they should "consider".

User avatar
n0ctilucient
Shogun
Shogun
Posts: 349
Joined: 21 Apr 2017, 15:59
Distribution: fullmoonremix
Location: 127.0.0.1
Contact:

Guest as root?

Post#8 by n0ctilucient » 06 Apr 2018, 02:27

Ooops... :%)

Sorry I was multitasking. It didn't work... :wall:

I tried it against a rooted cmdline which is why it appeared to work.

In xterm (guest) it caused this error...

Code: Select all

guest@porteus:~$ echo toor | sudo -S xfe

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password: Sorry about this, I know it's a bit silly.
Password: 
sudo: 1 incorrect password attempt
I'm interested in opening "root" frontends in a "guest" xterm terminal as "superuser".
(How can I preload the password?)

:unknown: Perhaps a script is needed.
Last edited by n0ctilucient on 06 Apr 2018, 04:20, edited 1 time in total.
:hmmm: I do NOT have the "right" to tell anyone what they should do...
but I reserve the "right" to tell them what they should "consider".

User avatar
n0ctilucient
Shogun
Shogun
Posts: 349
Joined: 21 Apr 2017, 15:59
Distribution: fullmoonremix
Location: 127.0.0.1
Contact:

Guest as root?

Post#9 by n0ctilucient » 06 Apr 2018, 02:54

Ok... I found it.

Code: Select all

echo guest | sudo -S -u root "nameoffrontend"
The idea is to run frontends from pekWM's floating menu as root w/out entering
a passowrd @ a cmdline or dialog box (ie. porteus-settings-centre).

Like this @ /etc/pekwm/menu...

Code: Select all

		Entry = "file manager" { Actions = "Exec echo guest | sudo -S -u root xfe" }
Pls Note: ...it's ok to run as root this way (I'm using a firejail sandbox on all frontends) ;)
Last edited by n0ctilucient on 07 Apr 2018, 03:14, edited 1 time in total.
:hmmm: I do NOT have the "right" to tell anyone what they should do...
but I reserve the "right" to tell them what they should "consider".

User avatar
Ed_P
Contributor
Contributor
Posts: 3955
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit ISO
Location: Western NY, USA

Guest as root?

Post#10 by Ed_P » 06 Apr 2018, 04:01

:good:
Ed

Post Reply