LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices



Reply
 
Search this Thread
Old 07-03-2012, 03:16 AM   #1
rajini23
Member
 
Registered: Sep 2011
Posts: 152

Rep: Reputation: Disabled
Angry Hi, problem in visudo


Hi,

I wants to give write permission for the normal user in sudo,i have provide /bin/rm(remove),/bin/mkdir,/bin/cp permissions,
please tell me how can i give write permission in visudo file for the user...


Please help me on this....
 
Old 07-03-2012, 03:19 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
write permissions for what? This doesn't really make much sense. They will be running whatever they are, as root, so there are no permissions to provide.
 
Old 07-03-2012, 08:04 AM   #3
rajini23
Member
 
Registered: Sep 2011
Posts: 152

Original Poster
Rep: Reputation: Disabled
Unhappy

Hi, for normal user wants to provide the editing permission for file for
particular folder in root...
 
Old 07-03-2012, 08:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Again, there is no permission. Root can edit any files, so if a user has access to vi through sudo then they can edit any files.
 
Old 07-04-2012, 01:32 AM   #5
rajini23
Member
 
Registered: Sep 2011
Posts: 152

Original Poster
Rep: Reputation: Disabled
Unhappy

Ok wheni give "vi" sudo permission its working but user wants to access the file in GUI mode

for that how can i give the permission .....
 
Old 07-04-2012, 01:41 AM   #6
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
Don't do that. If you give someone permissions to start vi/vim as root (or any other text editor) then sudo becomes useless because the user can give himself any rights he want. This is a serious security hole.
Rather use file permissions/SELinux for a task like this.
 
Old 07-04-2012, 03:02 AM   #7
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Quote:
Originally Posted by TobiSGD View Post
Don't do that. If you give someone permissions to start vi/vim as root (or any other text editor) then sudo becomes useless because the user can give himself any rights he want. This is a serious security hole.
Rather use file permissions/SELinux for a task like this.
Oh absolutely, please don't think I was advocating it!
 
Old 07-04-2012, 03:05 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Main: Gentoo Others: What fits the task
Posts: 15,653
Blog Entries: 2

Rep: Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097Reputation: 4097
Quote:
Originally Posted by acid_kewpie View Post
Oh absolutely, please don't think I was advocating it!
Of course not, I know that you have the knowledge about that. I wanted to point that out to the OP, since he seems to have a lack of knowledge about these issues.
 
Old 07-04-2012, 03:05 AM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
Quote:
Originally Posted by rajini23 View Post
Ok wheni give "vi" sudo permission its working but user wants to access the file in GUI mode

for that how can i give the permission .....
You're asking the wrong questions here I think. What you sound like you want to do doesn't match a legitimate security model. If you need a user to be able to edit a file, you would generally set the permissions on the *FILE* to allow that, not on the users side. If it's a file that a user needs to be able to edit, then you'd typically use chmod to allow their group to edit that file, and manage the group memberships accordingly.
 
  


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
[SOLVED] editor for visudo newk Linux - Newbie 7 12-04-2009 02:01 AM
visudo question walidaly Linux - Software 5 05-23-2007 09:59 AM
visudo noonmid27 Linux - Newbie 8 02-23-2007 05:42 PM
Need help with visudo powadha Debian 2 12-19-2004 06:04 AM
visudo xviddivxoggmp3 Slackware 7 08-17-2004 09:19 PM


All times are GMT -5. The time now is 07:47 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration