LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 07-03-2010, 12:41 AM   #1
siranjeevi
Member
 
Registered: May 2010
Location: India
Posts: 73

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
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH
~

"to"

# .bash_profile

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

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/bin:/usr/sbin:/sbin

export PATH
~

but nothing seems to be working. Can anyone help.

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

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Hi,

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.
 
  


Reply


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


All times are GMT -5. The time now is 11:20 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration