LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 06-07-2006, 02:09 PM   #1
Dankles
Member
 
Registered: May 2004
Location: /dev/null
Distribution: Slackware
Posts: 245

Rep: Reputation: 31
uninstall sudo


Will their be any problems if I uninstall sudo? I'm not asking for the reasons why sudo is a great "security" feature, I just wanna know if it's gonna kill my system if i uninstall it.
 
Old 06-07-2006, 02:44 PM   #2
brianthegreat
Member
 
Registered: Oct 2005
Posts: 518

Rep: Reputation: 32
Do not believe that you should uninstall sudo but you can disable it and then use root. It's listed some where (near the bottom I believe) of the guide regarding ubuntu.

http://easylinux.info/wiki/Ubuntu_dapper

http://easylinux.info/wiki/Ubuntu_da..._user_password

Last edited by brianthegreat; 06-07-2006 at 02:46 PM.
 
Old 06-07-2006, 03:06 PM   #3
Dankles
Member
 
Registered: May 2004
Location: /dev/null
Distribution: Slackware
Posts: 245

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by brianthegreat
Do not believe that you should uninstall sudo but you can disable it and then use root. It's listed some where (near the bottom I believe) of the guide regarding ubuntu.

http://easylinux.info/wiki/Ubuntu_dapper

http://easylinux.info/wiki/Ubuntu_da..._user_password
I would rather just kill the command completely.
 
Old 06-07-2006, 03:39 PM   #4
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
You can setup your system so that it uses a proper root account instead of sudo but you cannot remove sudo completely without removing some other packages e.g. Ubuntu-base, gdm etc. The way I disable sudo, is to setup a password for root ($sudo passwd root) as a normal user (the one with sudo privileges). I then login as root in the command line and run visudo and comment out the section that enables users in the admin group to run all commands e.g.
Code:
# Members of the admin group may gain root privileges
#%admin ALL=(ALL) ALL
After that I remove the admin group and its entries from /etc/group. If you want to keep the admin group, just remove the normal user with sudo privileges from the admin group section in /etc/group.
 
Old 06-25-2006, 08:46 AM   #5
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45
Quote:
Originally Posted by reddazz
You can setup your system so that it uses a proper root account instead of sudo but you cannot remove sudo completely without removing some other packages e.g. Ubuntu-base, gdm etc. The way I disable sudo, is to setup a password for root ($sudo passwd root) as a normal user (the one with sudo privileges). I then login as root in the command line and run visudo and comment out the section that enables users in the admin group to run all commands e.g.
Code:
# Members of the admin group may gain root privileges
#%admin ALL=(ALL) ALL
After that I remove the admin group and its entries from /etc/group. If you want to keep the admin group, just remove the normal user with sudo privileges from the admin group section in /etc/group.
Can you clarify a little reddazz, i.e. when I try to log in from command line as root - logically I open a terminal and do su/rootpassword, but when I issue visudo, it keeps telling me that the sudoers file is busy - I mean, if I'm not actually using sudo at the time, I don't follow why it might be busy ????

Or are you logging in as root at CLI in some different way?

regards

John
 
Old 06-25-2006, 05:10 PM   #6
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
I log as the admin user, then set a password for root using "sudo passwd root". I then log out from the admin user account and login properly as root and run visudo.
 
Old 06-27-2006, 12:17 AM   #7
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
Perhaps if tell us what you wish to accomplish and why we can come up with perhaps a better solution than removing sudo. Perhaps you're more accustomed to su like with SuSE. If you just don't want to be "annoyed" by typing sudo, much of what requires root login can be accomplished with a scrip in Nautilus. If you have to ask "how do I," you may be better asking "this is my problem, what should I do?"
 
Old 06-27-2006, 01:54 AM   #8
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,775

Rep: Reputation: 86
I'm with fragos. There's absolutely no reason to get rid of sudo apart from "I'm just used to..."

If you want to browse graphically as root, get a launcher for the command
Code:
gksudo nautilus
in Gnome or
Code:
kdesu konqueror
for KDE. It's actually easier, faster, and more secure than logging in as root graphically.

If you want to operate in the terminal as root without typing the word sudo ten times, just type
Code:
sudo -s
This will give you a root prompt.
 
Old 06-27-2006, 11:11 AM   #9
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,692
Blog Entries: 9

Rep: Reputation: 45
I can see your point both. It's mainly my preference, i.e. all the distros that I've used before (mandriva, SuSE, gentoo, slackware, debian) have all been conventional inasfaras root and user "and ner the twain shall meet".

I'm not convinced that the ability to screw up just by typing sudo infront of a command is particularly a good idea - I can see why it might have been implemented here (with the "buntu's" that it), they are all about ease of use (nice, well developed base distro, excellent package manager in apt, etc etc).

I just prefer to admin my system in the more conventional way, so that everything is nicely seperated in a full multi-user way.
 
Old 06-27-2006, 05:50 PM   #10
pljvaldez
LQ Guru
 
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094

Rep: Reputation: 281Reputation: 281Reputation: 281
The real power of sudo lies in the sudoers file. Ubuntu's default sudo file leaves a little to be desired as you're right, just by fat fingering with sudo in front of a command you can screw stuff up. But your sudoers file should really limit the commands each user/group can execute as opposed to
Code:
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
Really it should be restricted more than that to only allow those tasks deemed really necessary.

As to whether sudo is better than using su, I would generally agree that sudo is better solely because you're only running ONE command as root. I had a friend enter the linux world who su'd to root and forgot, then did some things that really hosed up his user account because he was root the whole time. Not unrecoverable, but a bit of a pain to fix. If he had sudo, he might have screwed up one thing, but wouldn't have done a whole string of things...

Oh, I would venture to guess that you could uninstall sudo and it would probably remove a bunch of meta-packages (the actual packages should stay in place). At least in Debian nothing depends on sudo. I guess Ubuntu might have changed that so that some key system components do depend on sudo...

Last edited by pljvaldez; 06-27-2006 at 05:57 PM.
 
Old 06-27-2006, 06:00 PM   #11
fragos
Senior Member
 
Registered: May 2004
Location: Fresno CA USA
Distribution: Ubuntu 10.10
Posts: 1,466

Rep: Reputation: 51
sudo was culture shock to me as well. I will have to admit, it's growing on me a bit. There are time when being root the way we're used to just works better. If try booting into Recovery you'll get a pleasant surprise. Level 3 as root without X. This is a great place to install Nvidia drivers from their site. Ubuntu let's you go to a level 3 session but X is still running and prevents some types of updates. Recovery gives me the old way again. The next thing to look at is Nautilus scripts. There are two I use that allow root access to functions without having to open a terminal window. To use them you just place them in /home/{user}/.gnome2/nautilus-scripts. On any file in Nautilus, right click and select the script you want to run. I have one that opens as root the application you would get if you just clicked the file icon. Great for changing root permissions on a file or editing a configuration file with gedit. "Open as Administrator" is a 3 line script:

for uri in $NAUTILUS_SCRIPT_SELECTED_URIS; do
gksudo "gnome-open $uri" &
done

Note that your password will still be required. I also use a bash script for "Xterm here" that opens a terminal window with the directory set to the one your viewing in Nautilus. A real time savor. These techniques will remove the tedium of sudo for most actions with blocking you from the benefits when it just makes sense to use it. Hope this helps you exist in the world of sudo.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Need to uninstall SuSe 8.1 & there is no uninstall jwhibdon Linux - Software 10 10-26-2006 11:57 AM
How do you uninstall software which doesn't have an uninstall-file? lagu2653 Linux - Software 2 12-08-2005 12:36 PM
uninstall from src if no make uninstall dtra Linux - Software 3 04-29-2005 09:13 AM
Source uninstall with 'make uninstall' HOWTO! Creeps Linux - Newbie 6 09-14-2004 11:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 01:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration