Hi!
The question that bothers me isn't actually ubuntu related but since it concerns linux, I consider it appropriate.
I recently happened to install Debian on a rather old laptop. By the end of the installation, I had been asked to set passwords for 2 users, one of them being root. The other user (henceforth the regular user) did not even have the right to sudo... I could've added it to the sudoers list but I thought I'd use 'su root' instead when need be.
As I had not installed a desktop environment of any kind during the installation, I had to do it now using apt-get / aptitude. And so I did. I installed both, xfce and xdm (naturally, using su root => being logged in as root while doing so).
All was nice, except for the fact that the regular user could not restart or shut down the system from within xfce (I'm not sure about root). The only reasonable explanation I could think of was the lack of user privileges which in turn was probably the consequence of the fact that the regular user did not belong into a group with sufficient privileges, right?
Anyway, at some point I decided that Xfce was a bit too resource hungry, logged in as root using 'su root' in the terminal and installed lxde instead while retaining the xdm login manager and rejecting the gdm which is the default for lxde, AFAIK.
The result was nice, but neither of the users (this time I really tested with both of them) could initiate a shutdown or restart from within lxde. Actually, the menu only had the log off entry...
As the system started to complain about missing themes anyway, I removed xdm and gave gdm a try after all (installed & removed by using 'su root'). GDM was, as expected, considerably slower but having logged in to lxde through gdm the users could shut down and restart without any problems.
Explanations?
All this made me think about user privileges. Was it ok to use 'su root' for installing & removing the desktop environments or would it have been better to add the regular user to the sudoers list and install using 'sudo' while being logged in as the regular user?
The way I see it, these methods are equal, as while using 'sudo' a regular user is equal to root, at least when it comes to installing & removing stuff via apt-get. AFAIK, any kind of such activity is actually done by the root user, even if it is done by a user using sudo. This is the only way, right?
I'd be happy, if anyone would confirm my understanding or enlighten me if I'm wrong. I just want to be sure that I did not create a possible security risk by installing those environments through 'su root'.
All the best,
K
Bookmarks