Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Technical

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 20th March 2006, 21:15
pushembekar pushembekar is offline
Junior Member
 
Join Date: Mar 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default sudo su -- vs. sudo su -

Hello everybody,

I was wondering if someone could tell me the difference between the commands
Code:
sudo su --
and
Code:
sudo su -
I noticed that when I use
Code:
sudo su -
I cannot open certain applications like gedit. That is what piqued my interest in this area.

Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 25th March 2006, 16:50
dishawjp dishawjp is offline
Junior Member
 
Join Date: Feb 2006
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Perhaps there are options to the sudo command that I'm not familiar with, but I think that it's possible that you've confused two somewhat similar commands.

The "sudo" command allows users specified in a sudoers file which is usually located in the /etc directory to perform certain functions (again, as permitted by the sudoers file) that are normally reserved for the root user. The syntax would be something like:

sudo <command>

where <command> is normally limited to the root user. You may be prompted for your normal user password, and if the root user has given you permission (in the sudoers file) to perform that action, you can.

The "su" command is a "switch user" command. In its simplest form, typing "su" will prompt you for the root password and if given correctly you get root privileges. Typing "su -" and giving the correct password gives you root's privileges and environment. The "su" command can also be used to gain access to another "normal" user's account if you have that user's password. To do that you would type "su <username>" where <username> is a valid normal user on that system.

This is my understanding of these commands. If those you listed are valid commands, I apologize for any misleading information, but the ones I described are definitely valid Linux commands.

HTH,

Jim

<edit>
gedit should take no special privileges to open. You may need root privileges to edit certain files though.
</edit>

Jim
__________________
Registered Linux User 294493

Last edited by dishawjp; 25th March 2006 at 16:55.
Reply With Quote
  #3  
Old 25th March 2006, 17:00
sbovisjb1 sbovisjb1 is offline
Senior Member
 
Join Date: Feb 2006
Posts: 176
Thanks: 0
Thanked 1 Time in 1 Post
 
Default sudo su and sudo su --

Well in Ubuntu (im assuming you are using it) sudo su - gives you super user privlages for that account to make changes to and such. sudo su -- gives you privialdges for the ENTIRE server... thats why some apps dont work for su - because the changes (like boot or some apps) will affect all users. Now that difference won't affect you if you're the admin or dont have any other users apart from you're self but you can actually edit permssions (such as boot or yum/apt-get privaladges with a few scripts.....
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo / sudoers question Ovidiu Technical 6 15th July 2006 14:15


All times are GMT +2. The time now is 03:27.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.