Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 07-03-2010, 12:41 AM   #1
Registered: May 2010
Location: India
Posts: 79

Rep: Reputation: 7
How to make a normal user execute commands of the super user's .?..

Hi everybody,

I have a question that i want to make a normal user to execute the commands which the root user is able to execute, say if i have a user named siru and when i logged in using siru i cannot run commands like tracert,nmap@loccalhost and all but i can run when i have logged into root account so my question is how to make siru to run the command tracert,nmap@localhost.

I have even edited the .bash_profile of siru's home directory from

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs


export PATH


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc

# User specific environment and startup programs


export PATH

but nothing seems to be working. Can anyone help.

Old 07-03-2010, 03:51 AM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391Reputation: 2391

Changing the content of .bash_profile (the PATH part in your case) will not do the trick.

As a general rule you do not want to give normal users root privileges, but there are cases that a normal user wants to execute one (or a few) "root commands". To make this possible the sudo command was implemented.

Here's a general description of the sudo command: Sudo - Wikipedia

These links will help you set things up and show some examples:
Sudo Setup Guide - linuxhelp
Using sudo - LHN

There are a lot of articles to be found on-line about this topic, so do use your favorite search engine for more information. You don't mention your linux distro, I'm guessing there is one specific for that one, so do include your distro in the search.

Hope this helps.


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
Execute script on local server as normal user to run commands on remote server ALInux Linux - Software 1 01-01-2010 06:30 AM
[SOLVED] Cant execute commands that is in sbin/ with normal user. tERn Linux - Desktop 1 10-16-2009 11:18 AM
super user privileges check for a normal user in bash script freeindy Programming 2 08-01-2008 06:08 AM
Linux - How to add a new user with the same root/super-user's privileges? asgarcymed Linux - General 8 12-23-2006 07:45 PM
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:39 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration