A strange request [Solved :) ]
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: A strange request [Solved :) ]
No, if one is mostly working in always fresh mode.
I guess every situation is different. I work exclusively from fresh mode, but I always have a personal settings module that gets loaded along with base to make my life easier. On my system, guest is in the wheel group and I rarely have to enter a password.
I don't think you can echo a password to su unless you trick it somehow.
I guess every situation is different. I work exclusively from fresh mode, but I always have a personal settings module that gets loaded along with base to make my life easier. On my system, guest is in the wheel group and I rarely have to enter a password.
I don't think you can echo a password to su unless you trick it somehow.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
-
- Full of knowledge
- Posts: 2071
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: A strange request [Solved :) ]
@ Ed
Yes, it's me again..
Some observations:
One has to use the guest Pw
if one uses the root PW ,toor, you get
BUT
once the Pw is given it seems to be valid for some time.
(some Minutes)
to check this behavior open a terminal, start a program with sudo,
-- i use xfce so i used thunar --, close it and reopen it again
as you can see i had to give the Pw only once.
this works as long as i do it in the same terminal
(I don't know how long exactly it will work)
If you open a 2nd terminal and invoke the same command (e.g.sudo thunar)
you will be asked for the Pw while you still can start thunar (or whatever)
in the 1st terminal without Pw.-- crazy.
I'm writing this as an explanation for myself (and you) because i could not believe
that the command
did work for you -- because "echo toor" is definitely wrong..
Yes, it's me again..
Some observations:
One has to use the guest Pw
Code: Select all
guest@porteus:~$ echo guest | sudo -S activate ./tree.xzm
Code: Select all
guest@porteus:~$ echo toor | sudo -S activate ./tree.xzm
Password: Have a gorilla...
Password:
sudo: 1 incorrect password attempt
guest@porteus:~$
once the Pw is given it seems to be valid for some time.
(some Minutes)
to check this behavior open a terminal, start a program with sudo,
-- i use xfce so i used thunar --, close it and reopen it again
Code: Select all
guest@porteus:~$ sudo thunar
Password:
guest@porteus:~$ sudo thunar
guest@porteus:~$ sudo thunar
guest@porteus:~$ sudo thunar
this works as long as i do it in the same terminal
(I don't know how long exactly it will work)
If you open a 2nd terminal and invoke the same command (e.g.sudo thunar)
you will be asked for the Pw while you still can start thunar (or whatever)
in the 1st terminal without Pw.-- crazy.
I'm writing this as an explanation for myself (and you) because i could not believe
that the command
Code: Select all
guest@porteus:~$ echo toor | sudo -S activate ...
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: A strange request [Solved :) ]
Hey Don. Haven't heard from you in awhile. How are you?donald wrote:@ Ed
Yes, it's me again..
It does indeed work for me and in a new guest terminal window.I'm writing this as an explanation for myself (and you) because i could not believe
that the commanddid work for you -- because "echo toor" is definitely wrong..Code: Select all
guest@porteus:~$ echo toor | sudo -S activate ...
Code: Select all
guest@porteus:~$ chrome.sh
Activating Chrome module
Press Enter after Activated
Starting Chrome - takes a moment or two
Press Enter when done using Chrome.
Deactivating Chrome module
Cleaning up
guest@porteus:~$
Code: Select all
if [ "$RUN_OPTION" = "" ]; then
echo Activating Chrome module
echo toor | sudo -S activate $OPTIONAL/chrome.xzm > /dev/null 2>&1 &
echo Press Enter after Activated
read
and
echo Deactivating Chrome module
echo toor | sudo -S deactivate $OPTIONAL/chrome.xzm > /dev/null 2>&1 &
Will be interesting to see if it still works when I reboot in the morning.
Ed
-
- Full of knowledge
- Posts: 2071
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: A strange request [Solved :) ]
Hi Ed
--> you are using Porteus 2.0 ..<--
xfce 3.2 rc3 32Bit (always fresh) was used.
I'm at a loss..
--> you are using Porteus 2.0 ..<--
xfce 3.2 rc3 32Bit (always fresh) was used.
I'm at a loss..
-
- Full of knowledge
- Posts: 2564
- Joined: 25 Jun 2014, 15:21
- Distribution: 3.2.2 Cinnamon & KDE5
- Location: London
Re: A strange request [Solved :) ]
^^^
Cinnamon 3.2rc3 got GUI dialog as well.
Cinnamon 3.2rc3 got GUI dialog as well.
Linux porteus 4.4.0-porteus #3 SMP PREEMPT Sat Jan 23 07:01:55 UTC 2016 i686 AMD Sempron(tm) 140 Processor AuthenticAMD GNU/Linux
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB
NVIDIA Corporation C61 [GeForce 6150SE nForce 430] (rev a2) MemTotal: 901760 kB MemFree: 66752 kB
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: A strange request [Solved :) ]
I was going by the Distribution shown on your user id. It could be a rc3 problem. I haven't tried it there, yet.donald wrote:xfce 3.2 rc3 32Bit (always fresh) was used.
Ed
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: A strange request [Solved :) ]
Yup. Me too. rc3 Cinnamon 64bit
And only for the activate.
Code: Select all
root@porteus:~# su guest
guest@porteus:/root$ cd /home/guest
guest@porteus:~$ ./chrome.sh
Password: <--------------------------------
Activating Chrome module
Press Enter after Activated
Starting Chrome - takes a moment or two
Press Enter when done using Chrome.
Deactivating Chrome module
Cleaning up
guest@porteus:~$
Code: Select all
if [ "$RUN_OPTION" = "" ]; then
echo Activating Chrome module
echo toor | sudo -S activate $OPTIONAL/chrome.xzm > /dev/null 2>&1 &
echo Press Enter after Activated
read
:
:
Ed
-
- Full of knowledge
- Posts: 2071
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: A strange request [Solved :) ]
Ed, may i ask you to do a (simple) test?
(re-) boot into pure always fresh (guest)
open a terminal and run a program, e.g.like mousepad, with sudo
(it must be a fresh boot-up, otherwise the Pw may still be saved/valid)
use the root PW -toor-....this should not work.
If it works, than there is something wrong with the implementation of sudo.
IMHO sudo is meant to let a restricted user run a command with elevated rights,
without knowing the root Pw.(someone might correct me here)
(that's why "echo guest" works while "echo toor" should not)
maybe Mr. brokenman can shed some light on this matter.
(re-) boot into pure always fresh (guest)
open a terminal and run a program, e.g.like mousepad, with sudo
(it must be a fresh boot-up, otherwise the Pw may still be saved/valid)
Code: Select all
guest@porteus:~$ sudo mousepad
Password:
If it works, than there is something wrong with the implementation of sudo.
IMHO sudo is meant to let a restricted user run a command with elevated rights,
without knowing the root Pw.(someone might correct me here)
(that's why "echo guest" works while "echo toor" should not)
maybe Mr. brokenman can shed some light on this matter.
- ncmprhnsbl
- DEV Team
- Posts: 3941
- Joined: 20 Mar 2012, 03:42
- Distribution: v5.0-64bit
- Location: australia
- Contact:
Re: A strange request [Solved :) ]
pretty sure sudo can be set up in a number of ways, including using the root password(or none), it just defaults to the current users password...donald wrote:IMHO sudo is meant to let a restricted user run a command with elevated rights,
without knowing the root Pw.(someone might correct me here)
its purpose is temporary priviledge escalation(one process or script) without a continuing root login...
Forum Rules : https://forum.porteus.org/viewtopic.php?f=35&t=44
- brokenman
- Site Admin
- Posts: 6105
- Joined: 27 Dec 2010, 03:50
- Distribution: Porteus v4 all desktops
- Location: Brazil
Re: A strange request [Solved :) ]
Yes this is correct. Compare both of your sudoers files and the problem should reveal itself. Also show if your user is in the wheel group or not.pretty sure sudo can be set up in a number of ways, including using the root password(or none)
EDIT:
Previously porteus only ever asked for the root password. Then we introduced sudo and sudoers was changed to ask for the root password so as not to confuse users. Sudo was gradually integrated and now should only ask for the user password.
How do i become super user?
Wear your underpants on the outside and put on a cape.
Wear your underpants on the outside and put on a cape.
-
- Full of knowledge
- Posts: 2071
- Joined: 17 Jun 2013, 13:17
- Distribution: Porteus 3.2.2 XFCE 32bit
- Location: Germany
Re: A strange request [Solved :) ]
@ ncmprhnsbl, brokenman
Thanks for that.
I haven't thought about the fact that "sudo" might be configured differently
in the various versions of porteus..
Ed, sorry for the confusion that I have caused.
Thanks for that.
I haven't thought about the fact that "sudo" might be configured differently
in the various versions of porteus..
Ed, sorry for the confusion that I have caused.
- Ed_P
- Contributor
- Posts: 8373
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: A strange request [Solved :) ]
Sure.donald wrote:Ed, may i ask you to do a (simple) test?
(re-) boot into pure always fresh (guest)
open a terminal and run a program, e.g.like mousepad, with sudo
(it must be a fresh boot-up, otherwise the Pw may still be saved/valid)use the root PW -toor-....this should not work.Code: Select all
guest@porteus:~$ sudo mousepad Password:
Code: Select all
guest@porteus:~$ sudo mousepad
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:
I feel much better now.
Password:
You do that again and see what happens...
Password:
Code: Select all
Warning, you are using the root account, you may harm your system.
No problem and no confusion. We've ended up with clarify.donald wrote: Ed, sorry for the confusion that I have caused.
Thank you all.
Ed