sudo and root privileges

Asked by peter

Hi

I recommended to use sudo gedit /etc/X11/xorg.conf. And the guy told me that he doesn't have the privileges to store the file after the update.

I thought sudo will give root privileges. But I guess I was mistaken. I know I should read the man page, but till yet I couldn't find the time to do it.

Does sudo give root privileges? Or is the working alternative sudo su gedit /etc/X11/xorg.conf? Thanks.
Peter

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Solved by:
peter
Solved:
Last query:
Last reply:
Revision history for this message
Uwe Geuder (ubuntulp-ugeuder) said :
#1

sudo gives root privileges.

Just run sudo gedit, create a file, and check its owner using "ls -l" from the command line.

Programs with a graphical interface might require gksudo in order to start correctly, but I'm not familiar with the details. However gedit seems to start fine using sudo.

Revision history for this message
Oleg Koptev (koptev-oleg) said :
#2

maybe problem of that guy was that he's edited xorg.conf more, than 15 minutes (default time that sudo have power without entering password twice)?

and yes, su make you SuperUser for a whole session, without time restriction, instead sudo only let you run only command (and with time restriction as I explain).
P.S. you needn't use sudo su :)

Revision history for this message
peter (peter-neuweiler) said :
#3

Hi Uwe

Thanks for your reply. I guess we could speak German, but English is ok *lol.

I recommended to use sudo gedit /etc/X11/xorg.conf and I got the answer, that they are not able to save the file after the update.

Do you know what the reason could be? Thanks.
Peter

Revision history for this message
Tom (tom6) said :
#4

There might have been some error about creating a backup file for xorg.conf Perhaps the user didn't have enough space on his hard-drive (i seldom have spare space as i like filling it with Voyager and stuff lol). Perhaps the user missed the sudo part of the command off. Somewhere between us trying our best and the user trying their best is a gap where we can't look over their shoulder and give a gentle nudge. Just keep up the good work, many appreciate it :)

Thanks peter, regards from
Tom :)

Revision history for this message
peter (peter-neuweiler) said :
#5

Hi Uwe, hi Koptev, hi Tom

Thanks for your answer.
Peter