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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
12-20-2008, 11:05 AM
|
#1
|
Member
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77
Rep:
|
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?)?
|
|
|
12-21-2008, 10:44 PM
|
#2
|
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
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?
|
|
|
12-21-2008, 10:48 PM
|
#3
|
Member
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77
Original Poster
Rep:
|
Quote:
Originally Posted by Simon Bridge
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.
|
|
|
12-22-2008, 12:18 AM
|
#4
|
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
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.
|
|
|
12-22-2008, 08:17 AM
|
#5
|
Member
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77
Original Poster
Rep:
|
Quote:
Originally Posted by Simon Bridge
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?
|
|
|
12-22-2008, 08:47 AM
|
#6
|
Member
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77
Original Poster
Rep:
|
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.
|
|
|
12-22-2008, 10:50 AM
|
#7
|
Member
Registered: Aug 2008
Distribution: Ubuntu Hardy Heron 8.04 LTS
Posts: 77
Original Poster
Rep:
|
Quote:
Originally Posted by flouran
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.
|
|
|
12-26-2008, 10:59 PM
|
#8
|
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211
Rep: 
|
Well done - I was waiting for you to mention trying sudoers. Now for that other thing: apt-get in DSL
|
|
|
All times are GMT -5. The time now is 01:11 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|