Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 3269  / 1 Year ago, sun, december 4, 2022, 3:15:25

My question is asking regarding a specific observation that I would like to understand.



I just tried to install the package rJava in R and failed even though I prefaced the installation as suggested by the manual with:



sudo R CMD javareconf


Then I came across this comment:




Using sudo and running as root are not exactly the same thing. – Jon7




Desparate as I was I tried it:



sudo su
R CMD javareconf


And to my surprise I suddenly could install that package.






Sorry for the lenghty introduction but I wanted to give you a context to prevent answers like here. The question does not aim at specifically the described observation - rather at those "things" in general on Ubuntu.



My question is: How could this be possible? What is the difference between sudo X and runnding X as root?


More From » sudo

 Answers
4

That's somewhat too broad to explain it will end with conclusion like in a link that you linked to your question, but I'll try something more fullfilled maybe it will give you some answers.



sudo ("substitute user do") allows a system administrator to delegate authority to give certain users (or groups of users) the ability to run some (or all) commands as root or another user while providing an audit trail of the commands and their arguments.



Sudo is an alternative to su for running commands as root. Unlike su, which launches a root shell that allows all further commands root access, sudo instead grants temporary privilege escalation to a single command. By enabling root privileges only when needed, sudo usage reduces the likelihood that a typo or a bug in an invoked command will ruin the system. Sudo can also be used to run commands as other users; additionally, sudo logs all commands and failed access attempts for security auditing.



More detailed info about Root Sudo can be found on Official Ubuntu Documentation


[#24748] Monday, December 5, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
disdry

Total Points: 133
Total Questions: 128
Total Answers: 109

Location: Greenland
Member since Fri, Jul 31, 2020
4 Years ago
;