LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-06-2011, 05:31 AM   #1
numa
LQ Newbie
 
Registered: Jul 2006
Location: Bath, uk
Distribution: PCLinuxOS; CentOS; Distributions developed with Wind River Linux 4.1
Posts: 19

Rep: Reputation: 0
Busybox and user permissions: for example enable user to mount


Hi,

I hope that somebody can help me with the following question:

I have three users on my system which is based on Busybox:
* root
* admin
* myuser

I am trying to enable admin to do certain tasks which myuser should not be able to do, such as mounting a usb. To mount an usb a user should be able to run mdev and mount commands.

My question is how do I give permissions to admin but not to myuser? The restriction here is that I am using Busybox and I am limited to which packages I can add to the system.

Regards,

Emmanuel
 
Old 09-06-2011, 07:29 AM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
There may be a way to do it with groups (ie. having a 'mount' group that the admin is part of, and the user isn't, and giving execute permission to group but not world for the 'mount' execution) but a far neater way would be to use the 'sudo' command. Do you have / can you install 'sudo' ?
 
Old 09-06-2011, 10:27 AM   #3
numa
LQ Newbie
 
Registered: Jul 2006
Location: Bath, uk
Distribution: PCLinuxOS; CentOS; Distributions developed with Wind River Linux 4.1
Posts: 19

Original Poster
Rep: Reputation: 0
Hi Snark,

Thank you your advises.

The problem with the first solution is that mount is in fact a symbolic link to busybox and you can change the permission on a symbolic link.

The second solution sounds possible. I added the sudo package but I am having issue to make it work. I am trying to give permission to admin to mount and to use tcpdump but with no success for the moment. I will carry on trying ...

Thank you.

Emmanuel
 
Old 09-06-2011, 10:34 AM   #4
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
You can put something in your sudoers along the lines of:

Code:
admin hostname=/sbin/mdev
admin hostname=/sbin/mount
...where hostname is your actual hostname
 
Old 09-06-2011, 10:40 AM   #5
numa
LQ Newbie
 
Registered: Jul 2006
Location: Bath, uk
Distribution: PCLinuxOS; CentOS; Distributions developed with Wind River Linux 4.1
Posts: 19

Original Poster
Rep: Reputation: 0
Hi Snark,

Brilliant this is working now: tcpdump and mount.

Thank you for your help.

Emmanuel
 
  


Reply

Tags
busybox


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
how to automount usb drives with user owner and user r/w permissions mike11 Linux - Newbie 1 11-19-2009 03:59 PM
Giving user 'www-data' same permissions as normal user MikeOfAustin Linux - Software 5 06-08-2007 03:50 AM
Mount samba share at boot with user write permissions Wynd Linux - Software 2 08-22-2006 12:48 AM
Cant mount cdrom in normal user, tried to set permissions, no work. Kindly help me. RHLinuxGUY Slackware 2 09-13-2004 10:35 PM
How do I change permissions so I can mount cdrom as user? bearon50 Slackware 1 12-22-2003 06:43 PM


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