You are not logged in.

#1 2016-02-21 22:17:36

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

root terminal rant

damo wrote:

maybe root terminal could be added

I don't like that idea at all.

For a "root terminal", users should open a normal terminal and run:

sudo -i

EDIT: Also:

damo wrote:

maybe tint2conf could be added (is it fixed now?)

Nope, it's still broken.

IMO, this distribution should encourage users to edit text files directly (the UNIX way) rather than using a pointy-clicky interface (the Windows way).

Mod Note: off-topic rant split from https://forums.bunsenlabs.org/viewtopic.php?id=1321
-HoaS

Last edited by Head_on_a_Stick (2016-02-22 09:29:33)

Offline

#2 2016-02-21 22:55:07

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: root terminal rant

Head_on_a_Stick wrote:
damo wrote:

maybe root terminal could be added

I don't like that idea at all.

For a "root terminal", users should open a normal terminal and run:

sudo -i

EDIT: Also:

damo wrote:

maybe tint2conf could be added (is it fixed now?)

Nope, it's still broken.

IMO, this distribution should encourage users to edit text files directly (the UNIX way) rather than using a pointy-clicky interface (the Windows way).

I do sudo su when needing to do heavy root level work. Done this way, CTRL-D will take you back into user level when done with system modifications. If in a chroot from a rooted terminal CTRL-D twice takes you back into user level. Journalctl -f will show pam shutting down the sudo command once you exit back into user mode.

Offline

#3 2016-02-21 22:59:26

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: root terminal rant

tknomanzr wrote:

sudo su

It may be better to use:

sudo su -

This starts the shell as a login shell (as does `sudo -i`) with an environment similar to a "real" root login, see su(1) for more on this.

Offline

#4 2016-02-22 01:28:11

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,155
Website

Re: root terminal rant

Head_on_a_Stick wrote:

For a "root terminal", users should open a normal terminal and run:

sudo -i

I use:

sudo su

I guess I should look at the man page and see what the difference is. 8o man sudo? man su? Ah, both.


I don't care what you do at home. Would you care to explain?

Online

#5 2016-02-22 09:24:29

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: root terminal rant

hhh wrote:

see what the difference is

`sudo -i` would be preferable to `sudo su` because it starts a login shell.

The updated su(1) man page from my Arch system explains the "-" flag better than the jessie man page:

-, -l, --login
              Start the shell as a login shell with an environment similar to a real login:

                 o      clears all the environment variables except TERM

                 o      initializes the environment variables HOME, SHELL, USER, LOGNAME, and PATH

                 o      changes to the target user's home directory

                 o      sets argv[0] of the shell to '-' in order to make the shell a login shell

Offline

#6 2016-02-22 15:39:41

pingu
Member
Registered: 2015-09-29
Posts: 128

Re: root terminal rant

I just opened my bashrc add in that line. Then I realized that it was already there big_smile

alias su="sudo -i"

"Chuck Norris can compile syntax errors."

Offline

#7 2016-02-22 15:53:49

el_koraco
Member
Registered: 2016-02-08
Posts: 307

Re: root terminal rant

If I remember correctly, opening a root shell with sudo is ill-advised any way, something to do wtih the system not tracking the commands, thus defeating the purpose of sudo.

It does seem to me that you should either run commands as sudo or simply give your root account a password. I do agree that the distribution shouldn't provide a root terminal though, any user wishing to open one should learn how to do it themselves.

Offline

#8 2016-02-22 16:02:23

pingu
Member
Registered: 2015-09-29
Posts: 128

Re: root terminal rant

el_koraco wrote:

If I remember correctly, opening a root shell with sudo is ill-advised any way, something to do wtih the system not tracking the commands, thus defeating the purpose of sudo.
...

interesting...

Feb 22 13:07:08 r2d2 bash: HISTORY: PID=22961 UID=1000 su -l
Feb 22 13:07:24 r2d2 -su: HISTORY: PID=22991 UID=0 less /var/log/user.log 
[...]
Feb 22 13:08:17 r2d2 bash: HISTORY: PID=22961 UID=1000 sudo -i
Feb 22 13:08:25 r2d2 -bash: HISTORY: PID=23101 UID=0 less /var/log/user.log 

edit: I don't see much difference aside from the "-su" and "-bash" thing. is that what you mean?

Last edited by pingu (2016-02-22 16:13:54)


"Chuck Norris can compile syntax errors."

Offline

#9 2016-02-22 16:53:17

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: root terminal rant

Thunar has a r-click context item: "Open root terminal here"


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

#10 2016-02-23 02:01:50

hhh
Gaucho
From: High in the Custerdome
Registered: 2015-09-17
Posts: 16,155
Website

Re: root terminal rant

Why was this moved to TGN? Moving this to Development, we're also discussing (or are about to discuss) default terminal options again, and this ties in with that.


I don't care what you do at home. Would you care to explain?

Online

#11 2016-04-04 09:40:07

AndyMender
Member
From: Reincarnated in the UK :)
Registered: 2016-04-01
Posts: 49
Website

Re: root terminal rant

I would also strongly recommend against a root terminal. Not only is it not needed, but for new users (Windows-to-GNU/Linux converts) it might be an incentive to overuse the 'administrator power' and quickly get into trouble.

Finally, isn't the root account locked out by default anyway? I saw this per the simplified Debian 8.3 Jessie installer.


In a GNU/Linux daze since forever. Hail to Debian and Arch!

Offline

#12 2016-04-04 16:46:47

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,093
Website

Re: root terminal rant

AndyMender wrote:

isn't the root account locked out by default anyway?

Yes.

The root account can be unlocked with:

sudo passwd root

Offline

#13 2016-04-04 17:01:18

Snap
Member
Registered: 2015-10-02
Posts: 465

Re: root terminal rant

^ That

This is an important discussion. Thanks for opening it, HoaS.

My own rant:

Why not using just su (root account)? Personally I hardly ever use sudo for anything but login out without a password. Either login as su in a terminal emulator, or use su-to-root set as su, or directly go to a tty (no X), login as root, do the stuff and logout when done.

I don't like giving any power to regular users/sudoers other than passwordless  logout. I know many won't like this as default. Many won't like to use two different passwords (user & root) and in fact don't want to use any password at all. Convenience and ease of use at the cost of security never sounded any good to me.

Last edited by Snap (2016-04-04 17:10:43)

Offline

#14 2016-04-04 19:32:44

tknomanzr
BL Die Hard
From: Around the Bend
Registered: 2015-09-29
Posts: 1,057

Re: root terminal rant

I think Crunchbang offered a root terminal  in the menu. If so it would have been:

gksudo terminator

which would need to be changed to:

gksudo x-terminal-emulator

Last edited by tknomanzr (2016-04-04 19:33:39)

Offline

#15 2016-04-04 20:09:16

Rocky
Member
From: Ireland
Registered: 2016-02-03
Posts: 25

Re: root terminal rant

I think I agree with Snap. Surely sudo is to limit privileges only to essential admin purposes not to grant full privileges. If a user account or password is compromised and sudo su is available then for all intents and purposes root access is achieved ?

On the other hand if a separate root account is used and an ordinary user account (without sudo privileges)  is compromised then damage would be limited to that account ?

I can see the practical argument in a multi user environment that if ordinary users are totally locked down then the temptation is at some point to provide the root password to a user which essentially then compromises the root password.

On a system that I am using myself though, a complete separation between my ordinary user account and the root account surely enhances security and makes me more conscious of the two different roles ?


"The long way out is the short way home"

Offline

Board footer

Powered by FluxBB