How to gain root ac...
 
Notifications
Clear all

How to gain root access in Linux (experts only)

31 Posts
6 Users
1 Likes
15.9 K Views
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @pugwash

@robo-pi, as the SU, you have all the omnipotence of an OS dictator that you need for your Rasberry Pi Banana Republic.

I already have this.  But for some reason the desktop GUI program installer doesn't have this sudo permission.  So when I try to install a problem from there is always asks for my password.  If I install a program using the command prompt I am not asked for a password because I have already told it not to ask me for a password.

I guess what I actually need to do is figure out how to have the GUI program installer recognized as having sudo privileges.

In fact, now that I think about it, it's probably the entire GUI desktop that doesn't have sudo privileges.  I can't create directories or modify files in directories that require sudo privileges from the desktop file manager.  Instead I need to use the command prompt and type in sudo first.

So perhaps what I'm really looking for is a way to give my desktop GUI sudo privileges?

It's not a real big deal.  It's just a bit annoying that it keeps asking me for a password every time I want to install a program.  All I want to do is have it stop asking me.  And this is only associated with the desktop GUI program installer.  It already doesn't ask me for my password when I install programs from the command prompt, assuming I use sudo first.   I guess on the command line "sudo" basically takes the place of the password if you've told it not to ask for passwords.

But there's no way to type in sudo from the GUI desktop.

So I guess the real question is, "How do I give my GUI desktop sudo privileges?"

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
VE1DX
(@ve1dx)
Member
Joined: 5 years ago
Posts: 143
 
Posted by: @robo-pi

"How do I give my GUI desktop sudo privileges?"

Set up the root account from the command line as previously described.  Then from the GUI pulldown Preferences --> Raspberry Pi Configuration ->System (Tab) uncheck Login as user 'pi' and click OK.  Then logout.  The login screen will then prompt you with the account 'pi' and a password.  Pull down the User name in the box displayed and pick Other.  In the first blank box type in root and in the second one put in your root password.  Click Log In.  This will log you in as root and it should give you the power you are looking for.

Paul VE1DX


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@robo-pi

So I guess the real question is, "How do I give my GUI desktop sudo privileges?"

You can't and there is a good reason why?

Before Graphic User Interfaces, interacting with a computer was a series of cryptic "secret" commands typed into a terminal by someone who understood exactly what they were doing. But as the computer industry developed they decided to put a computer in the home of every f*****g simpleton on the planet that could afford one, so they needed to develop an interface between the computer and complete idiots, hence the advent of GUIs.

This secret world has not gone away, it is still there in the Terminal, a tool that is not used by dumbass users of FaceBook and Co., Amazon etc..

The reason I said it would not be possible, is that if these idiots were able to manipulate the OS from the top-level GUI, they would just cause havoc in the underlying OS probably bringing their computer to an unrepairable standstill, which would be a major disaster for the computer industry and sheer hell for support phone lines.

As you would probably agree "a little knowledge is a dangerous thing", therefore the OS has to be protected from simpletons and idiots!!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @pugwash

As you would probably agree "a little knowledge is a dangerous thing", therefore the OS has to be protected from simpletons and idiots!!

That's not a good reason to make it impossible for computer experts to give their own personal GUI desktop sudo privileges.

The moment you allow idiots to restrict what you can do you become an idiot yourself.

So calling people idiots is no excuse to prevent experts from giving their own desktop GUI sudo privileges.

So as far as I'm concerned, if there is no way to give the desktop GUI sudo privileges then it's the experts who have become the idiots.

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@robo-pi

I think by idiot's, pugwash was speaking in the general sense of the people working in such organisations - I also have worked in IT, in large financial institutions for many years, and I can categorically state that there are many of these idiots breaking things on a daily basis - You would be seriously surprised at the level of incompetence that go's on in the IT world 🙂

I can also categorically state, that like the OP, I too have stuffed up magnificently, making simple mistakes as root on my personal systems, so you really do need to be careful... it's not what you know or how good you are, it's how distracted you can get when logged in as root!

Posted by: @robo-pi

So as far as I'm concerned, if there is no way to give the desktop GUI sudo privileges then it's the experts who have become the idiots.

Not so fast... if root can do it, then there must be a way (though I don't advocate it)!

In your case, you're obviously not the root user, that's why you're continually asked to enter your credentials.  However, if root can do it, then root must have special permissions, and what are they?  Well, try to view your permissions on the installer via the ls -l command... do you have execute permissions on that installer file as yourself?

If not, then as root, look into using the chmod (change mode) command, or the chown (change owner) command I mentioned earlier to give yourself ownership and or execute permissions for that installer, and it may just do what you want!

Cheers!


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@frogandtoad

Allow me to rephrase the use of the word "idiot", in the context of my previous post. I was probably a bit hard, but I meant the "computer illiterate masses". And this is defined by those who have never left the Desktop GUI, which I guess would mean well over 90% of users, and certainly never tried the command line or Terminal to achieve whatever they set out to do. The vast majority are quite happy just to "surf the net", write a few emails or share their unqualified opinions on social media. The very fact that anyone joins a forum like this is proof that they enjoy digging below the surface of Desktop GUI and this privilege is afforded to everyone by giving them SUDO access to the OS.

The reason that privileges cannot be extended to the Desktop GUI, is to prevent the "computer illiterate masses" having access to anything that could harm or inadvertently alter the Operating System. I certainly don't see any sane reason to change this as all the tools to access the underlying OS are freely available to everybody.

As I said the programmers who design OS's are very protective of their systems, of which, the more open the OS to the world, the less security is protecting the OS. It is a simple trade-off situation.

@robo-pi

I did not infer or intend to infer that any particular individual was an idiot, though judging by your comments you believe I was. Sorry!!

Just one more thing, most Linux based OS's are already open-source, therefore you can alter them to your heart's content, and "good luck" trying.


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@pugwash

Posted by: @pugwash

Allow me to rephrase the use of the word "idiot", in the context of my previous post. I was probably a bit hard, but I meant the "computer illiterate masses". And this is defined by those who have never left the Desktop GUI, which I guess would mean well over 90% of users, and certainly never tried the command line or Terminal to achieve whatever they set out to do.

Indeed... that's what I tried to say! 🙂

Posted by: @pugwash

The reason that privileges cannot be extended to the Desktop GUI

Do you actually mean that they should not be extended, or actually cannot be extended via permissions?

Having said that, I agree that it should not be done, and I don't advocate doing it.

Cheers!


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@frogandtoad

Do you actually mean that they should not be extended, or actually cannot be extended via permissions?

I don't think it is at all possible, furthermore, I really don't see any point doing it even if it was possible!


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@pugwash

Sure, but its not about the point anymore... its about destroying your system 🙂


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 
Posted by: @frogandtoad

@pugwash

Sure, but its not about the point anymore... its about destroying your system 🙂

That is why there are IT experts, to put them back together again ? ? ? 


   
ReplyQuote
frogandtoad
(@frogandtoad)
Member
Joined: 5 years ago
Posts: 1458
 

@pugwash

Posted by: @frogandtoad
Posted by: @frogandtoad

@pugwash

Sure, but its not about the point anymore... its about destroying your system ?

That is why there are IT experts, to put them back together again ? ? ? 

With power comes great stuff ups!

One of my classics is shutting down a server via terminal services rather than choosing the restart option 😉


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @pugwash

I don't think it is at all possible,

If that's the answer then why not just say so?

My original question wasn't a question of whether or not it would be secure to do so, but rather whether or not it's possible. 

So is it really impossible?  Or do you just not know how to do it?

DroneBot Workshop Robotics Engineer
James


   
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@robo-pi

My original question wasn't a question of whether or not it would be secure to do so, but rather whether or not it's possible. 

Whether you install using Terminal or a .pkg file from the Desktop GUI, you will always be asked for your Username and password!

Therefore the answer is a definitive NO!


   
ReplyQuote
Robo Pi
(@robo-pi)
Robotics Engineer
Joined: 5 years ago
Posts: 1669
 
Posted by: @pugwash

Whether you install using Terminal or a .pkg file from the Desktop GUI, you will always be asked for your Username and password!

That's not true.  I already have my system set up to not ask me for passwords when installing programs from the command line.

The only place I'm still being asked for a password is by that desktop software installer program.  It's no big deal really.  It's just a little bit annoying because I'm still setting these systems up and it gets old having to type in the password every time I want to install another program.   It won't remove them without a password either.

But if I go to the terminal I can install or remove them without having to type in a password.

I hate passwords with a passion.   It's just like having keys for our cars and homes it's disgusting.  If everyone was like me there would be no need for keys or passwords.

Hopefully when I die and go to heaven I'll never see another key or password again. ? 

These are things that belong in the realm of hell. ? 

DroneBot Workshop Robotics Engineer
James


   
codecage reacted
ReplyQuote
(@pugwash)
Sorcerers' Apprentice
Joined: 5 years ago
Posts: 923
 

@robo-pi

That's not true.  I already have my system set up to not ask me for passwords when installing programs from the command line.

I have never bothered to suppress the password as I have been regularly connecting to my computer through the internet using ssh and an RSA key login.

And it doesn't bother me if I have to punch in a password every now and then!!


   
ReplyQuote
Page 2 / 3