LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 10-03-2007, 11:04 AM   #1
treotan
Member
 
Registered: Jun 2004
Posts: 126

Rep: Reputation: 15
Sudo apt-get


I'm a ubuntu starter; now I want to install some software and do not want to use root account. So I use "sudo" to install. But it cannot work! It prompts to enter password, but it do not continuous to install the software. It do not like the root account, it would show the installation progress! Is it the user need to have admin right or ....?

Thanks in advance
 
Old 10-03-2007, 11:27 AM   #2
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
When sudo prompts you for a password, enter your own password.

Look at your /etc/sudoers file.
If your username isn't anywhere in that file, you need to add it. I can't remember the syntax off of the top of my head, but in the Debian sudoers file, there is an example. The syntax should be something similar to this:
Code:
username ALL(ALL) ALL
Like I mentioned before, I can't remember off of the top of my head the exact syntax, but I know what I've given you here is just a basic, basic, basic example to give username all root abilities with an sudo. It can be changed so that the user is only granted root access to certain commands, files, etc.

Last edited by indienick; 10-03-2007 at 11:29 AM. Reason: Elaboration
 
Old 10-03-2007, 06:12 PM   #3
dfowensby
Member
 
Registered: Dec 2003
Location: OceanView Virginia, gem of the Southern Shore
Distribution: Oz Unity Diamond IIB [x64 xfce]
Posts: 194
Blog Entries: 1

Rep: Reputation: 30
Root Access

This is something you will want to restore to its original status, if Anyone else uses your box:

Log in to your normal Ubuntu home.

click System/Admin, and click on Users and Groups. on the prompt, give your regular password.

open root. change root password to yours. click Priviledges, and mark them all.

go to System/Admin, and click Login Window

change the security section to allow local root login.

exit.

reboot.

login as root, password, and have fun!

word to the Wise: reverse all this when you're done if anyone else is using the box.
Havalottafun! -O.
 
Old 10-03-2007, 06:22 PM   #4
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
dfowensby, you should not encourage people to log into x as root as it is a bad security practice
 
Old 10-03-2007, 06:44 PM   #5
dfowensby
Member
 
Registered: Dec 2003
Location: OceanView Virginia, gem of the Southern Shore
Distribution: Oz Unity Diamond IIB [x64 xfce]
Posts: 194
Blog Entries: 1

Rep: Reputation: 30
Retort

Tell it to Bill Gates. If you read more than two lines of my suggestion, you saw my final recommendation. If he's a newb, all he understands is direct root access, and to help his problem as understandably as possible was my goal. On a dedicated single-user/home box, x login/root access is laughable, at least in linux. the average time lapse for crack access for a trojan is 3 days. we're talking about a 5 minute fix.
I posted to help him, and provided positive understandable suggestions to the best of my ability here: i recommend you do the same.
 
Old 10-03-2007, 07:53 PM   #6
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
what I would do is
type this in the terminal
sudo passswd
then type in what you want to be your root password then type
su
then run apt-get,
 
Old 10-03-2007, 10:09 PM   #7
treotan
Member
 
Registered: Jun 2004
Posts: 126

Original Poster
Rep: Reputation: 15
Thanks indienick
I added the new user to /etc/sudoers file.
username ALL = (ALL) ALL

Now It can do anything, is like a root account. Thanks. But now the new user is a root, it have fully access right to the machine?



Quote:
Originally Posted by indienick View Post
When sudo prompts you for a password, enter your own password.

Look at your /etc/sudoers file.
If your username isn't anywhere in that file, you need to add it. I can't remember the syntax off of the top of my head, but in the Debian sudoers file, there is an example. The syntax should be something similar to this:
Code:
username ALL = (ALL) ALL
Like I mentioned before, I can't remember off of the top of my head the exact syntax, but I know what I've given you here is just a basic, basic, basic example to give username all root abilities with an sudo. It can be changed so that the user is only granted root access to certain commands, files, etc.
 
Old 10-03-2007, 10:18 PM   #8
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
only with the sudo command
 
Old 10-04-2007, 07:15 PM   #9
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
The user has to actually type "sudo" and then supply the current user's password. So, if you let somebody use your laptop, and they try to run sudo without your knowledge (and supplying you haven't run sudo yourself within a half hour beforehand), they won't be able to get anywhere.
 
Old 10-04-2007, 10:00 PM   #10
Flab0y352
Member
 
Registered: Aug 2007
Location: Sunshine State
Distribution: Debian Testing
Posts: 72

Rep: Reputation: 15
dont use apt-get use aptitude much more gooder
 
Old 10-05-2007, 02:37 PM   #11
indienick
Senior Member
 
Registered: Dec 2005
Location: London, ON, Canada
Distribution: Arch, Ubuntu, Slackware, OpenBSD, FreeBSD
Posts: 1,853

Rep: Reputation: 65
@treotan:
You're very welcome.


At the risk of starting a flame war (and deterring from the OP) - there's no effing difference between using aptitude and apt-get between:
Code:
$ sudo apt-get install ...

AND

$ sudo aptitude install ...
There is NO BLOODY DIFFERENCE. I'm sick and tired of people saying "...Aptitude is better." The only time I use aptitude in its curses-based interface is when I don't have X and Synaptic installed, and I don't know a package's name.

EDIT: Flab0y352 - Don't post for the sake of posting. Troll elsewhere.

Last edited by indienick; 10-05-2007 at 02:40 PM.
 
Old 10-05-2007, 06:56 PM   #12
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
indienick, I agree with you, in all of the debian based distro I have used, I have never come across a difference in apt-get and aptitude
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
LXer: The Ultimate Sudo FAQ To Sudo Or Not To Sudo? LXer Syndicated Linux News 13 04-13-2013 01:36 AM
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Sudo without having to type "sudo?" Mitch G Linux - Security 3 09-28-2006 02:16 PM
sudo apt-get install acroread returns "Couldn't find package acroread" swiadek Ubuntu 3 02-13-2006 10:52 AM
apt-get update errors since Debian released ( bad /etc/apt/sources.list ?) forgox Debian 10 06-13-2005 12:28 PM


All times are GMT -5. The time now is 10:45 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration