LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-20-2008, 12:05 PM   #1
flouran
Member
 
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77

Rep: Reputation: 16
Talking Make superuser be authenticated in DSL (Damn Small Linux) 4.4.10


Hi Guys,
I am currently running a multiuser ssh server, and everytime I login with a limited account and I want to run a command, "rm -rf /" (I wouldn't do that of course, but hypothetically say I did), it requires me to be a superuser -- obviously. So, then I do, "sudo rm -rf /" (quotes omitted). However, DSL 4.4.10 doesn't prompt me for the superuser password but instead simply logs me in. For me, this is dangerous because I don't want other users to mess up the OS. I have set the root password, but now how do I set it to prompt a user for the password everytime s/he wants to do something that requires admin privileges (does it have something to do with pam_authenticate?)?
 
Old 12-21-2008, 11:44 PM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Um - surely it prompts you for a password the first time you use a sudo command?

Is this "normal user" account the one you created first?
What happens if you try this with another account?
 
Old 12-21-2008, 11:48 PM   #3
flouran
Member
 
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77

Original Poster
Rep: Reputation: 16
Talking

Quote:
Originally Posted by Simon Bridge View Post
Um - surely it prompts you for a password the first time you use a sudo command?

Is this "normal user" account the one you created first?
What happens if you try this with another account?
No it doesn't prompt me. And even when I try it with another account, I can just type "sudo rm -rf /" without authentication.
 
Old 12-22-2008, 01:18 AM   #4
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
What happens when you log in locally, not ssh, and try a regular user?

Verify by creating a wholley new user called "test", with defaults, log in as test and check the sudo behaviour.

The use of sudo in controlled by the sudoers file.
Check that - people who are not sudoers cannot use sudo at all. People who are sudoers need authentication, unless otherwise specified in sudoers.
 
Old 12-22-2008, 09:17 AM   #5
flouran
Member
 
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77

Original Poster
Rep: Reputation: 16
Talking

Quote:
Originally Posted by Simon Bridge View Post
What happens when you log in locally, not ssh, and try a regular user?

Verify by creating a wholley new user called "test", with defaults, log in as test and check the sudo behaviour.

The use of sudo in controlled by the sudoers file.
Check that - people who are not sudoers cannot use sudo at all. People who are sudoers need authentication, unless otherwise specified in sudoers.
If I run "sudo su" or "sudo -s" then I must authenticate. But if I run, "sudo rm -rf /" I don't need to authenticate. Maybe something is wrong with pam_authenticate, I'm guessing?
 
Old 12-22-2008, 09:47 AM   #6
flouran
Member
 
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77

Original Poster
Rep: Reputation: 16
Talking

By the way, how do I install packages in DSL? I tried "apt-get install <packagename?" (quotes omitted) under the root user because supposedly it is based off of Debian; however, it seems as though there is no apt-get.
 
Old 12-22-2008, 11:50 AM   #7
flouran
Member
 
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77

Original Poster
Rep: Reputation: 16
Talking

Quote:
Originally Posted by flouran View Post
If I run "sudo su" or "sudo -s" then I must authenticate. But if I run, "sudo rm -rf /" I don't need to authenticate. Maybe something is wrong with pam_authenticate, I'm guessing?
No, I fixed it. It has nothing to do with pam_authenticate. I just had to edit the /etc/sudoers file.
 
Old 12-26-2008, 11:59 PM   #8
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Well done - I was waiting for you to mention trying sudoers. Now for that other thing: apt-get in DSL
 
  


Reply

Tags
dsl, root, ssh, sudo


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
OS help / suggestion on a DSL (damn small linux) sir-lancealot Linux - General 0 11-19-2007 01:31 PM
LXer: DSL 4.0: Damn small improvement LXer Syndicated Linux News 0 11-13-2007 08:40 AM
LXer: DSL-N: Damn Small Linux gets bigger LXer Syndicated Linux News 0 06-24-2006 12:12 AM
installing gcc1.dsl.gz on Damn Small Linux c19h28O2 Linux - Software 0 04-27-2006 04:40 PM
DSL (Damn Small Linux) 1.2 is out!!!!! t3gah DamnSmallLinux 3 06-12-2005 10:46 PM


All times are GMT -5. The time now is 12:38 PM.

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