6

I was wondering why the command do-release-upgrade doesn't require sudo? I mean, it does significantly change your system, so I would have guessed it requires sudo.

This is from ubuntu self, but it isn't that helpful. I just want to know how this is secure for the integrity for my system, if every user can access this command.

Thanks in advance.

[EDIT]:

I used a new terminal window, thus no sudo that wasn't expired yet, and I used the command do-release-upgrade NOT sudo do-release-upgrade.
So even with unexpired sudo I should be unable to upgrade.

[EDIT 2]:

enter image description here enter image description here

1
  • Same happened here: do-release-upgrade and I went from 16.10 to 17.04. No "sudo" but I'm not 100% sure if I was prompted for the password somewhere after the start.
    – user372194
    Apr 14, 2017 at 16:01

2 Answers 2

4

I just ran do-release-upgrade in my terminal and look what happened:

do-release-upgrade

So you don't have to worry about this anymore. do-release-upgrade is a python script located in /usr/bin which can be accessed by every user, but this script needs, as you can see, root privileges when it starts to perform actions on the system.

6
  • How comes I updated from 12.10 > 13.04, and now from 13.04 > 13.10 without sudo? EDIT: O you are already in 13.10 :P
    – Dr_Bunsen
    Oct 17, 2013 at 17:37
  • @Dr_Bunsen No, I'm still in 13.04. You probably entered before in terminal your password, and this didn't expired. There is a time limit in which you are not asked twice by password when you use sudo. See askubuntu.com/questions/14948/…. Oct 17, 2013 at 17:48
  • I know this. It was a clean terminal, and I didn't enter a sudo infront of the command.
    – Dr_Bunsen
    Oct 17, 2013 at 18:04
  • @Dr_Bunsen I don't think that something this is possible. For sure you used another command with sudo in front of it before to use this command or probably you was logged as root. Oct 17, 2013 at 18:22
  • I was logged in as my user account, in wchich I have to sudo in order to let things change.
    – Dr_Bunsen
    Oct 18, 2013 at 10:22
2

Put simply, do-release-upgrade implies sudo in the script so you don't have to type sudo yourself.

2
  • 1
    Thanks, but how is that an good idea? Now anyone can run the do-release-upgrade command.....
    – Dr_Bunsen
    Oct 18, 2013 at 10:31
  • Sure, but they can not install or upgrade. That requires sudo. All the script does is tell you if there is or is not an upgrade if you are a normal user ;)
    – Rinzwind
    Oct 18, 2013 at 10:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .