LinuxQuestions.org
Visit Jeremy's Blog.
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 09-29-2006, 03:44 AM   #1
Free_beer
Member
 
Registered: Jul 2006
Distribution: Fedora Core 6, Ubuntu
Posts: 31

Rep: Reputation: 15
Can you have "sudo" automatically added to each line in the CLI?


Bobs': "Hey Peter, You've been missing alot of work lately..."
Peter: "I wouldn't say I have been missing it Bob."

[user1@localhost]$ sudo
-----------To have this ^ automatically entered each time:
Which files would I need to configure?
 
Old 09-29-2006, 08:38 AM   #2
MacHamster
LQ Newbie
 
Registered: Sep 2006
Distribution: Kubuntu
Posts: 16

Rep: Reputation: 0
I know I'm going to get howled down and set on fire for what I'm about to say, but the easiest way to do what you want to do is to simply assign a password to the root account.

When you know you need to a do a heap of things as root, just become root and do them. Much easier in my worthless opinion.
 
Old 09-29-2006, 08:56 AM   #3
binary_y2k2
Member
 
Registered: Jul 2005
Location: England, UK
Distribution: Ubuntu 8.04 Server, Kubuntu 12.04
Posts: 698
Blog Entries: 1

Rep: Reputation: 31
how about "sudo -i" or "sudo -s"
both give you a root shell without having to set a root password, look at "man sudo"

--MacHamster
Notice how I didn't flame you
 
Old 09-29-2006, 10:05 AM   #4
lordSaurontheGreat
Member
 
Registered: Sep 2006
Distribution: Gentoo, SuSE 10
Posts: 94

Rep: Reputation: 16
Speaking from experience:

Ubuntu systems HATE having their root password set. Last time I tried that the necessary tweaking to get everything to work again was enough to make me reverse my position about setting the root password in Ubuntu.

If you want to learn from experience (not reccommended) use $ sudo passwd, or maybe it was $ sudo passwd root... I can't remember.

In short: deal with the sudo thing. Setting the root password isn't worth it. Also, you might consider adding yourself to the group root. I tried it, and now I can open Synaptic, KPackage, and Adept without needing to type a password.

Hope you find something that works for you!
 
Old 09-29-2006, 10:48 AM   #5
hrp2171
Member
 
Registered: Aug 2004
Location: California, USA
Distribution: Ubuntu
Posts: 243
Blog Entries: 3

Rep: Reputation: 30
Quote:
Originally Posted by Free_beer
Bobs': "Hey Peter, You've been missing alot of work lately..."
Peter: "I wouldn't say I have been missing it Bob."
Awesome!

And yes my reply is off-topic. Sorry!

Last edited by hrp2171; 09-29-2006 at 10:50 AM.
 
Old 09-29-2006, 11:00 AM   #6
hrp2171
Member
 
Registered: Aug 2004
Location: California, USA
Distribution: Ubuntu
Posts: 243
Blog Entries: 3

Rep: Reputation: 30
But this one is not!

I'm starting to like the sudo thing a lot. I feel safe using my computer all the time. Whereas when I'm using my ms box, I'm always nervous about spyware or virus notifications and such.
 
Old 09-29-2006, 12:26 PM   #7
lordSaurontheGreat
Member
 
Registered: Sep 2006
Distribution: Gentoo, SuSE 10
Posts: 94

Rep: Reputation: 16
Yah, I do miss all the virus and malware... Using the computer just isn't as exciting and dangerous as it used to be before I switched to Linux. I hear that virus writers don't support Linux yet... pity. They don't even support Wine. What a bummer!

I think I'll write a linux virus now: $ sudo rm -rf /

Oh, wait. That'll only work on Ubuntu workstations... and you have to input your root password... man, we Linux people miss out on a lot of the fun, don't we?
 
Old 09-29-2006, 03:59 PM   #8
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by lordSaurontheGreat
Speaking from experience:

Ubuntu systems HATE having their root password set. Last time I tried that the necessary tweaking to get everything to work again was enough to make me reverse my position about setting the root password in Ubuntu.

If you want to learn from experience (not reccommended) use $ sudo passwd, or maybe it was $ sudo passwd root... I can't remember.

In short: deal with the sudo thing. Setting the root password isn't worth it. Also, you might consider adding yourself to the group root. I tried it, and now I can open Synaptic, KPackage, and Adept without needing to type a password.

Hope you find something that works for you!
Its fairly easy to setup a root account and have things work properly. You could do
Code:
$sudo passwd root
After that you can then disable sudo by running visudo as root and commenting out the section that allows all users in the admin group to run all system commands. This method has always worked fine for me. If you set a root password and still keep using sudo, I have noticed that some apps will ask you for your password instead of roots password (which may or may not be desirable), so I prefer disabling sudo and going with the classical root account.

binary_y2k2 has good suggestions, so try those first before changing to a classical root account.

Last edited by reddazz; 09-29-2006 at 04:03 PM.
 
  


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
New SQUID user: How to clear the "access.log" and "store.log" automatically? yuzuohong Linux - Networking 2 12-02-2006 05:37 AM
cdrecord command-line parentheses "(" ")" coolingtower Linux - Software 1 10-28-2005 11:49 AM
Added a user, now root says "invalid password" gallwapa Linux - Security 20 10-17-2005 04:13 PM
how do I get around the "submit passwd" prompt in ubuntu even if I use "sudo"? t3gah Linux - Distributions 1 02-22-2005 04:42 PM
normal user want to perform "init 6" by using " sudo acbenny Linux - General 3 08-08-2004 07:41 AM

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

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