You are not logged in.

#1 2017-03-23 19:41:07

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Sudo and the Debian-netinstall + helium-dev script

Hey everyone. This isn't really a bug, more of a suggestion I suppose...So I'm going through from scratch, a clean install using the debian 9 stretch installer (rc2) and applying the bunsen helium additions to it.  What I've found is that if you specify a password for root in the debian installer, this normally allows you to switch to the root account with no need to use sudo or have it installed. So when you run the bunsen-helium upgrade, it'll error out saying you need to have  run this with sudo. But it sort of just ends there and unless you know the connection between sudo and root and how to then edit the sudo file, this may get a bit hairy for some?  Any chance that the script could be edited to prompt the user to, if needed if they entered a password during the initial debian install, to install sudo, and add the currently logged in user?

Again this isn't a bug but just something I noticed that may throw newer users for a loop...


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#2 2017-03-23 19:58:08

damo
....moderator....
Registered: 2015-08-20
Posts: 5,836

Re: Sudo and the Debian-netinstall + helium-dev script

It always helps to look at the netinstall-script README I suppose: https://github.com/BunsenLabs/bunsen-netinstall

README wrote:

DEBIAN NETINSTALL HINTS

Installing Debian Jessie by the netinstall CD is
similar to using the standard installer.

Two points to watch if you want to use
this netinstall script afterwards:

1) At the "Set up users and passwords" screen,
do NOT enter a password for root.
Type nothing and press "continue".
Do this again at "Re-enter password to verify".
Enter your own name and password as normal.
You will then be given 'sudo' permissions,
which will be needed in the script.
...
...

(This is from the jessie README, but the Helium-dev stretch one says the same)

Last edited by damo (2017-03-23 20:00:50)


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#3 2017-03-23 20:27:59

hhh
Meep!
Registered: 2015-09-17
Posts: 9,322
Website

Re: Sudo and the Debian-netinstall + helium-dev script

https://wiki.debian.org/sudo

As that article infers, if an operation demands greater privileges than sudo grants, use...

sudo -i 

Offline

#4 2017-03-23 20:31:57

hhh
Meep!
Registered: 2015-09-17
Posts: 9,322
Website

Re: Sudo and the Debian-netinstall + helium-dev script

Offline

#5 2017-03-23 20:56:25

damo
....moderator....
Registered: 2015-08-20
Posts: 5,836

Re: Sudo and the Debian-netinstall + helium-dev script

@hhh  This issue is specific to the bunsen netinstall script though. It must be run by $USER, and fails if the user doesn't have sudo permission, so during the debian netinstall you should skip the root password section, as described in the README.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#6 2017-03-23 21:34:02

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Sudo and the Debian-netinstall + helium-dev script

Lol, okay fair enough, but is there a reason for the need to make this specifically run only with sudo? You can't run it as a normal user with out it, and you can't run it as root.  I'm sure there is a reason, I'm not just making the connection why this needs specifically sudo


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#7 2017-03-23 22:08:40

damo
....moderator....
Registered: 2015-08-20
Posts: 5,836

Re: Sudo and the Debian-netinstall + helium-dev script

^ @johnraff will know the details, but since the script is setting up the /home/user configuration it needs to be run by that user. And sudo permissions are needed for system changes, package installation etc. - just as in the bl-welcome post-install script.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#8 2017-03-23 22:13:07

hhh
Meep!
Registered: 2015-09-17
Posts: 9,322
Website

Re: Sudo and the Debian-netinstall + helium-dev script

@damo, yeah, sorry. I posted those links as reasons why !# and now BL have the root account-setup disabled in the installer.

@Brave, @johnraff should explain his reasons himself. Give him a few days, he has stuff going on.

Offline

#9 2017-03-23 22:38:05

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Sudo and the Debian-netinstall + helium-dev script

damo wrote:

^ @johnraff will know the details, but since the script is setting up the /home/user configuration it needs to be run by that user. And sudo permissions are needed for system changes, package installation etc. - just as in the bl-welcome post-install script.

Hmm makes sense I suppose, but you think root would still have permission to set it up for another user in the same group.


hhh wrote:

@Brave, @johnraff should explain his reasons himself. Give him a few days, he has stuff going on.

Pfft, jeez, him not being at my beck and call is just unacceptable.   tongue

BTW, just finished this stack install, (boy does it come with a ton of packages) and it went off without a hitch. I removed fdpowermon to remove the redundancy. Great job on this everyone. I'm running this in VBox, I'll keep my eyes peeled for any odd/weirdness of course...


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#10 2017-03-23 23:10:58

damo
....moderator....
Registered: 2015-08-20
Posts: 5,836

Re: Sudo and the Debian-netinstall + helium-dev script

Horizon_Brave wrote:

.... I'm running this in VBox, I'll keep my eyes peeled for any odd/weirdness of course...

Install gnome-mpv, and see if you get the glitches that a couple of people have seen.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#11 2017-03-24 01:42:36

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 6,561
Website

Re: Sudo and the Debian-netinstall + helium-dev script

damo wrote:

since the script is setting up the /home/user configuration it needs to be run by that user. And sudo permissions are needed for system changes, package installation etc. - just as in the bl-welcome post-install script.

Damo has it.

  1. It's easier to set up a user if you're running as that user at the time. Root would have to make sure all the ownerships and permissions were set right.

  2. BunsenLabs is set up with sudo OOTB, with no root account. The netinstall script is conforming to that.

  3. It's safer to run a script as a normal user, invoking sudo only when needed. The possibilities for mass destruction due to a typo...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB