Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I read somewhere that you can set capabilities for a user. For eg, if i set the capability CAP_SYS_MODULE for a user, will that user be able to load a kernel module. if so how can I set a capability for a user ?
I'm going to guess that your thinking of sudo. Basically, sudo allows you to give users root privileges to run specific commands only. You do that by using the visudo command to edit the sudoers file. For example, if you wanted to give a user the ability to stop the computer, you would add the halt command to their entry in the sudoers file. Then they could use the command sudo halt to turn off the computer. However, that user wouldn't have root privileges to any command other than halt.
Thanks!! It solved half my problem. But I don't think sudo gives capabilities to a user. There are functions like capset to set the capabilities. But I am not sure how it works. Do you have any idea ?
Originally posted by vmniza Thanks!! It solved half my problem. But I don't think sudo gives capabilities to a user. There are functions like capset to set the capabilities. But I am not sure how it works. Do you have any idea ?
To be honest, I'm not entirely sure what you are aksing here. Sudo does give the user capabilites in that they can run commands that are normally not allowed. Could you be more specific about what you mean by capabilities, because your definintion seems to go beyond simply allowing new privileges with commands.
Take a look at the Linux Kernel Capabilities FAQ. It's a little bit old, but to be honest I'm not sure how much has progressed since then with the recent migration to the SELinux DAC model. For manipulating Linux CAPS, take a look at lcap. From what I've seen, in the 2.6 kernels POSIX capabilities support is now integrated into the LSM architecture, though I'm not sure if that needs to be specifically enabled in the kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.