nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

How to assign administrative right to others under Linux

This is a discussion on How to assign administrative right to others under Linux within the Linux software forums, part of the Linux Getting Started category; Under Solaris we use tool named RBAC is used to delegate/assign Administrative Roles. This tool does not exist under Linux ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-18-2005, 01:08 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
My distro: Suse, RHEL, Vista
Posts: 154
Rep Power: 4
sweta will become famous soon enough
Default How to assign administrative right to others under Linux

Under Solaris we use tool named RBAC is used to delegate/assign Administrative Roles. This tool does not exist under Linux so how I am gone assign different administrative right/tasks? I cannot give root access to users
to just reboot system or to restart httpd or mysql process; we are using
Red Hat Enterprise Linux 4.

Thanks!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-20-2005, 04:20 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 482
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

SUDO is the tool to delegate system administration job to other users without giving the root password. SUDO not just available on Linux but it is runs almost on every other UNIX like operating system.

Use visudo command to modify /etc/sudoers file under Linux.

Code:
visudo
sudo take care of lot of things; it allows only delegated user command/task. In oder to user run a command, you need to create a specific rule that grant user permission on the host/computer to run a command. The rule can be defined using following syntax:

USERNAME LINUX_HOST=COMMAND

OR

USERNAME LINUX_HOST=/path/to/command

Where,
USERNAME: The user (actual name of user) who is delegated or granted to execute the command.
LINUX_HOST: Linux computer name (host) i.e. hostname of the system where this rule applies. Host can be hostname, IP address, network address or special aliases.

COMMAND OR /path/to/command: Actual command/task granted to user. You must have a full path to ecah command name; further multiple commands need to separated using , (comm). For example /etc/init.d/apache stop, /sbin/shutdown -h now

Interesting part, let us say you would like to grant user monk to shutdown system and restart, stop, start apache on www host, then your rule should be as follows:

Code:
monk  www = /etc/init.d/httpd start, /etc/init.d/httpd stop, /etc/init.d/httpd restart, /sbin/shutdown -h now
Monk from his account can type following command to shutdown the httpd:
Code:
sudo /etc/init.d/httpd shutdown
When prompted for password type monk need to supply his own password.

Please have a look at sudo, sudoers, visudo man pages. Especially sudoers(5) which document all features and tons of examples.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Hughes Net Modem Assign IP to Server Don Getting started tutorials 1 03-25-2008 12:46 AM
Duplicity UnboundLocalError: local variable 'local_manifest' referenced before assign raj Networking, Firewalls and Security 1 06-09-2007 06:56 PM
how do i assign an alias in rcconf with freebsd All about FreeBSD/OpenBSD/NetBSD 1 01-10-2006 07:21 PM


All times are GMT +5.5. The time now is 09:23 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36