LinuxQuestions.org
Help answer threads with 0 replies.
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


View Poll Results: Which of the following uses of sudo do you prefer to gain root?
sudo -s 5 12.20%
sudo -i 10 24.39%
sudo su 24 58.54%
sudo bash 5 12.20%
Multiple Choice Poll. Voters: 41. You may not vote on this poll

Reply
  Search this Thread
Old 10-06-2010, 11:17 AM   #16
ClayOgre
LQ Newbie
 
Registered: Jan 2003
Location: Indiana, USA
Distribution: Slackware 12.2
Posts: 27

Rep: Reputation: 15

I don't like sudo. I would rather have an actual root password and use the root account directly.
 
Old 10-07-2010, 12:14 AM   #17
theddubl
LQ Newbie
 
Registered: Jul 2009
Location: NE USA
Distribution: Slackware & Ubuntu
Posts: 5

Rep: Reputation: 0
I use either sudo su or sudo su -, depending on whether I am feeling lazy and pampered and want to have my own environment or I want to use a correct and complete root environment. For the most part I just use sudo <progname> to avoid messing up a system by being root and forgetting what I am doing.
 
Old 10-07-2010, 01:11 AM   #18
ionrivera
Member
 
Registered: May 2010
Distribution: Debian, RHEL, AIX, Solaris, HP-UX
Posts: 61

Rep: Reputation: 4
Wink sudo -s and sudo -i

I use sudo -s and sudo -i depending on my needs...

Typing sudo -s , I gain root user without affecting my current working directory while typing sudo -i brings me instantly to /root directory.

Therefore, typing
ionrivera@it-024138:~/Documents/myscripts$ sudo -i vim test.txt
Will not result to see test.txt file on $HOME/Documents/myscript
but on /root/test.txt
 
1 members found this post helpful.
Old 10-07-2010, 07:24 AM   #19
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Rep: Reputation: 51
sudo su
 
Old 10-07-2010, 08:44 AM   #20
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by ClayOgre View Post
I don't like sudo. I would rather have an actual root password and use the root account directly.
I agree. This is why I avoid the *buntus.

BUT, if you are going to use a *buntu, then you should use it the *buntu way -- no sudo su. If you can't, then do as I do & don't use them at all. JMNRHO.
 
Old 10-07-2010, 10:05 PM   #21
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
Quote:
Originally Posted by Kenny_Strawn View Post
How about pressing Alt+F2 and typing gksudo gnome-terminal?
(Grin) 13 too many keystrokes?
 
Old 10-08-2010, 09:49 AM   #22
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Rep: Reputation: 41
Quote:
Originally Posted by archtoad6 View Post
I agree. This is why I avoid the *buntus.

BUT, if you are going to use a *buntu, then you should use it the *buntu way -- no sudo su. If you can't, then do as I do & don't use them at all. JMNRHO.
No root account and you can't enter single user mode without rebooting... two obvious problems with Ubuntu.
 
Old 10-09-2010, 02:20 AM   #23
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Whenever I need to do something that requires root (sudo) privileges, i just use plain old sudo.
I have never (and I have been using Ubuntu since the inaugural version of 4.10) found the need to use anything else, or to enable the root account (which is not recommended in Ubuntu). There is never any real need for sudo this or sudo that or sudo whatever!
I never, and I mean never, have any problems with Ubuntu either. Perhaps this is because I follow what the Ubuntu developers recommend!

Last edited by tommcd; 10-09-2010 at 02:25 AM.
 
Old 10-09-2010, 11:57 AM   #24
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Rep: Reputation: 51
I find the lack of a root account on Ubuntu to be refreshing. Anyone who actually signs on with the root account should have the most secure box in the world, and they better know what they are doing.

Using sudo to assign temporary root privileges is much safer in all regards. Never had a problem with it, and one of the reasons I choose Ubuntu.
 
0 members found this post helpful.
Old 10-09-2010, 12:12 PM   #25
pr_deltoid
Member
 
Registered: Jun 2010
Distribution: Fedora
Posts: 289

Rep: Reputation: 41
When I'm doing things from the console, it really annoys me to not be able to "su -" to root. If I have several things to do at once, I don't want to put my password in over and over again, and I set timestamp_timeout=0 in sudoers. Besides, if you're careful and think about what you're doing, there's no reason to worry about being root using the console.
 
Old 10-09-2010, 10:15 PM   #26
eveningsky339
Member
 
Registered: Mar 2010
Location: Western Maine
Distribution: PCLinuxOS (LXDE)
Posts: 466

Rep: Reputation: 51
Quote:
Originally Posted by pr_deltoid View Post
Besides, if you're careful and think about what you're doing, there's no reason to worry about being root using the console.
You're talkin' to the world's biggest cyber-klutz here.

I think as the Linux user base grows, we will be seeing more and more people who simply don't know a lot about how Linux works. sudo is a safety measure.
 
0 members found this post helpful.
Old 10-10-2010, 09:49 AM   #27
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
For what it's worth, I actually prefer the way other distros use a separate root account instead of using sudo. However, Ubuntu uses sudo, and recommends that the root account not be enabled and used. I am fine with that though.
For every distro that I use I follow what the developers of that distro recommend. If I strongly objected to using sudo, I would simply not use Ubuntu. If I strongly objected to using a distro that has a package manager that has no dependency management, I would not use Slackware. Linux is about choice and freedom. There is a distro to match everyone's preferences.
 
Old 10-13-2010, 09:34 PM   #28
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791

Original Poster
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by frankbell View Post
(Grin) 13 too many keystrokes?
Yes, but it would also ensure that the entire terminal window is run as root, not just the shell that it emulates.
 
Old 10-13-2010, 09:36 PM   #29
Kenny_Strawn
Senior Member
 
Registered: Feb 2010
Location: /usa/ca/orange_county/lake_forest
Distribution: ArchBang, Google Android 2.1 + Motoblur (on Motortola Flipside), Google Chrome OS (on Cr-48)
Posts: 1,791

Original Poster
Blog Entries: 62

Rep: Reputation: 56
Quote:
Originally Posted by pr_deltoid View Post
No root account and you can't enter single user mode without rebooting... two obvious problems with Ubuntu.
Code:
sudo init 1
Code:
sudo passwd
 
Old 10-14-2010, 03:51 PM   #30
coltree
Member
 
Registered: Nov 2003
Location: Jacobs Well, Queensland AU
Distribution: OpenBSD
Posts: 102
Blog Entries: 1

Rep: Reputation: 34
sudoers

I use Debian

1. I set up /etc/sudoers

%adm ALL=NOPASSWD: ALL

any member of adm group has full root privileges without a password using sudo

2. I use JWM window manager and have a menu section - Root
label="Files">sudo rox<
label="Term">sudo xterm<

of course the menu change is setup in /etc/menu-methods/jwm then run update-menus

so any user who is a member of the adm group can quickly get a root terminal or file manager

bit of setting up but very easy to use
 
  


Reply

Tags
preferred use, sudo



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
User executable script gaining root privileges w/o passwd neoAKiRAz Linux - General 6 09-06-2007 04:22 PM
Gaining root access to file manager Rick069 Linux - Software 2 04-27-2007 10:24 PM
gaining root access thebiggiantmouse Ubuntu 5 09-19-2006 03:53 AM
Gaining root access in Gnome jonasan Linux - Software 5 01-31-2006 11:11 AM
Gaining root access in KDE d-katz Linux - General 9 02-27-2004 05:46 AM

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

All times are GMT -5. The time now is 10:02 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