LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-07-2006, 10:17 PM   #1
marsguy
Member
 
Registered: Nov 2004
Distribution: Red Hat Enterprise & SuSe 10
Posts: 77

Rep: Reputation: 15
enable a command that requires root access for a normal user


I have 2 questions:

1-If a command is available only for root user, how can I enable it to the normal user as well, In Redhat the command "traceroute" is available for normal users, While in SuSe it is only available for root, So how can I enable it for normal user?

2-Can I create a user who has the full priveleges or the root but with a different name? if yes, how would I do that?

Thanks in advance
 
Old 10-07-2006, 10:25 PM   #2
zetabill
Member
 
Registered: Oct 2005
Location: Rhode Island, USA
Distribution: Slackware, Xubuntu
Posts: 348

Rep: Reputation: 32
Have you looked into the sudo command? It doesn't change anything, really. It's just a "wrapper" to give administrative priviledges without actually changing any file permissions. Anything other than that could possibly be unsafe.

If you're hell-bent on "cheating" and don't care about security then you could look into the "sticky bit" and adding /sbin and /usr/sbin to the user's path. Even less secure to the point of being dangerous you could just change the permissions of the program itself and ignoring the sticky bit. Again... quite unsafe and you didn't hear that from me...

Either way the solution ends up being rather simple.

EDIT: My guilt has made me come back just to tell you to please look into the sudo command before you start changing permissions and sticky bits. There are plenty of solutions with sudo being a great option.

Last edited by zetabill; 10-07-2006 at 10:28 PM.
 
Old 10-08-2006, 09:43 AM   #3
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
traceroute is nothing dangerous and isn't an issue for a user to run. Chances are /usr/sbin and /sbin aren't in the default $PATH for your user, my suggestion is to just add it. That way the user has access to attempt to run all the programs that may be traditionally root-only however if there is something you don't have permission to use, it'll just error out. Using sudo or messing with permissions will allow you to run stuff you potentially shouldn't be.

If you're using bash for your shell (chances are pretty high) just add this to your ~/.bash_profile:
Code:
export PATH="${PATH}:/sbin:/usr/sbin"
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to run root command having normal user permission ravi.patil Linux - Newbie 7 05-21-2006 02:21 PM
Slackware's Single User Mode requires root password too? StevenO Slackware 2 01-25-2006 08:28 PM
Give Root Access To A Normal User waknauss Linux - Security 2 11-11-2004 09:00 AM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
the opposite command of su? can i access user logins when i am root? how? kublador Linux - Newbie 3 09-11-2003 03:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:24 AM.

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