LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-29-2009, 12:43 PM   #1
linuxfia
Member
 
Registered: Apr 2008
Distribution: ubuntu 7.10, centos 4 & 5
Posts: 84

Rep: Reputation: 15
How to give only certain root privileges


We have Ubuntu 8.0.4.
We'd like to give this one user the ability to reboot the server but no other root privileges.
I'm assuming this can be done using sudo.
What file and what change do I need to make to it?

Thanks!
 
Old 05-29-2009, 02:17 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by linuxfia View Post
We have Ubuntu 8.0.4.
We'd like to give this one user the ability to reboot the server but no other root privileges.
I'm assuming this can be done using sudo.
What file and what change do I need to make to it?

Thanks!
Try adding this:

Code:
username ALL=(ALL) /sbin/reboot
to your /etc/sudoers file.
 
Old 05-29-2009, 05:37 PM   #3
linuxfia
Member
 
Registered: Apr 2008
Distribution: ubuntu 7.10, centos 4 & 5
Posts: 84

Original Poster
Rep: Reputation: 15
Thank you!
So if I want the user to be only able to start/stop/restart postfix, is this correct?

Quote:
username ALL=(ALL) /etc/init.d/postfix start
Quote:
username ALL=(ALL) /etc/init.d/postfix stop
Quote:
username ALL=(ALL) /etc/init.d/postfix restart
 
Old 06-01-2009, 11:35 AM   #4
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by linuxfia View Post
Thank you!
So if I want the user to be only able to start/stop/restart postfix, is this correct?
I don't think you can specify what postfix commands they could run, just /etc/init.d/postfix and you may get stuck needing to add privileges for other things the postfix script is calling since it's not a binary, but I can't test it right now to be sure.
 
  


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
how to give root privileges to normal user? caedo Linux - Newbie 11 08-28-2008 03:15 PM
give account root privileges mgichoga Debian 3 08-08-2005 07:50 AM
How to give user always root privileges? SimeonV SUSE / openSUSE 18 06-23-2005 11:02 AM
Root privileges for user ar1 Linux - Security 2 01-07-2005 09:33 PM
User with root privileges ShakyJake Linux - Newbie 2 06-18-2004 12:12 PM

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

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