LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2008, 08:53 PM   #1
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Rep: Reputation: 15
normal user removing a root file?


my normal user needs to remove a non-system critical file owned by root.

is this possible using sudo? I've tried doing 'rm /path/to/file' in the sudoers, but it wont write the file, I get a syntax error.

or is there another way of doing it?

Last edited by bashyow; 11-01-2008 at 08:54 PM.
 
Old 11-01-2008, 08:57 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Should be possible, what does the relevant line look like?


Cheers,
Tink
 
Old 11-01-2008, 09:05 PM   #3
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Original Poster
Rep: Reputation: 15
its this:

Code:
rm /etc/dhcpc/dhcpcd-wlan0.pid
*edit* I was able to remove the file, thanks anyway Tinkster.

first I forgot to include the full path of the rm command in the sudoers file:
Code:
%shutdown ALL=(root) NOPASSWD: /bin/rm /etc/dhcpc/dhcpcd-wlan0.pid
second, when executing the command on the CL, I forgot to prefix the command with 'sudo' !

Last edited by bashyow; 11-01-2008 at 09:37 PM.
 
Old 11-01-2008, 10:44 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Why isn't /var/run/dhcpc/dhcpcd-wlan0.pid used instead. You would still need to configure sudoers because of the sticky bit.
 
Old 11-02-2008, 12:32 PM   #5
bashyow
Member
 
Registered: Jun 2008
Location: uk
Distribution: Slackware 12.1, AND IM LOVIN EVERY MINUTE OF IT, JERRY! :D
Posts: 122

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jschiwal View Post
Why isn't /var/run/dhcpc/dhcpcd-wlan0.pid used instead. You would still need to configure sudoers because of the sticky bit.
I dont have a /var/run/dhcpc directory, just an /etc/dhcpc/dhcpcd-wlan0.pid.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
root vs 'normal' user perbh Slackware 10 05-20-2008 11:03 AM
Root? normal user? what does it all mean? Zieroth Linux - Newbie 5 07-16-2004 04:06 PM
Games runs slow as normal user, but fast as root user mcore Linux - Software 2 06-07-2004 11:11 PM
KDE users - Having root file manager while still logged in as normal user thegeekster Linux - General 1 04-27-2004 10:47 PM
Root and normal user Smooth Linux - Newbie 4 05-27-2003 10:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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