Quantcast

Not require sudo for running specific application as root

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Not require sudo for running specific application as root

Dotan Cohen
A user needs to run a specific application as root. I have finally
convinced him not to run the whole desktop as root, but now he must
precede the command to run the application with "sudo -i".

Is there a way to configure the system not to require the "sudo -i"
for this particular application? I know that I can remove the need for
a password for sudo, but that does not help as he still needs to give
the proper environment with "-i".

Yes, I am aware that there probably is "a better way" but I am trying
to get this user into the better habit of not running the desktop as
root.

My current idea is to add $HOME/.bin to his path, then mask the
command with a bash script that simply calls "sudo -i" before calling
the original command. I would disable sudo passwords for his account.
Any other ideas?


--
Dotan Cohen

http://bido.com
http://what-is-what.com

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Karan Grover
Hi Dotan

This is a cheeky one, but i hope it may do the job for you.
You can define an alias for the command required to run the application
in the users home directory profile for that particular application.
#vi .profile
alias <application command>='sudo <application command>
:wq

ask the user to log out and log in again.
This may solve the issue

HTH

Karan

Dotan Cohen wrote:

> A user needs to run a specific application as root. I have finally
> convinced him not to run the whole desktop as root, but now he must
> precede the command to run the application with "sudo -i".
>
> Is there a way to configure the system not to require the "sudo -i"
> for this particular application? I know that I can remove the need for
> a password for sudo, but that does not help as he still needs to give
> the proper environment with "-i".
>
> Yes, I am aware that there probably is "a better way" but I am trying
> to get this user into the better habit of not running the desktop as
> root.
>
> My current idea is to add $HOME/.bin to his path, then mask the
> command with a bash script that simply calls "sudo -i" before calling
> the original command. I would disable sudo passwords for his account.
> Any other ideas?
>
>
>  


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Hal Burgiss
In reply to this post by Dotan Cohen
On Thu, Apr 22, 2010 at 11:12 AM, Dotan Cohen <[hidden email]> wrote:
> A user needs to run a specific application as root. I have finally
> convinced him not to run the whole desktop as root, but now he must
> precede the command to run the application with "sudo -i".

Sounds like this is what you guys need:

http://www.cyberciti.biz/faq/unix-bsd-linux-setuid-file/


--
Hal

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

C de-Avillez-2
On Thu, 2010-04-22 at 11:28 -0400, Hal Burgiss wrote:
> On Thu, Apr 22, 2010 at 11:12 AM, Dotan Cohen <[hidden email]> wrote:
> > A user needs to run a specific application as root. I have finally
> > convinced him not to run the whole desktop as root, but now he must
> > precede the command to run the application with "sudo -i".
>
> Sounds like this is what you guys need:
>
> http://www.cyberciti.biz/faq/unix-bsd-linux-setuid-file/

Setting a programme 'setuid' to root is an extreme action, and should
not be done without a full analysis of the risks.

Instead, perhaps it would be enough to:

(1) set /etc/sudoers to allow the user to run this application without a
password;
(2) creating a menu item to launch it as'gksu -S /path/to/application'

..C..

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users

signature.asc (205 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: widget for broadband speed

Accessys@smart.net

my broad band speed fluctiates like crazy was wondering if there is a
widgget or some such that could sit on the corner of the screen that will
show the current download/upload speed????????


Bob

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: widget for broadband speed

Karan Grover
[hidden email] wrote:
> my broad band speed fluctiates like crazy was wondering if there is a
> widgget or some such that could sit on the corner of the screen that will
> show the current download/upload speed????????
>
>
> Bob
>
>  
there's one in KDE

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

any way to completly remove apache installation from source code in ubuntu

Karan Grover
In reply to this post by Accessys@smart.net
Hi Guys

Is there any ways to completly remove apache installation from source
code in ubuntu??

Karan


--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: widget for broadband speed

Accessys@smart.net
In reply to this post by Karan Grover

I'm running Kubuntu and KDE

where is it???? I have looked and looked.

have found several to "Test" the connection but I'm looking for a real
time continous readout', sort of like the speedometer on a car.

thanks
Bob

On Thu, 22 Apr 2010, Karan Grover wrote:

> Date: Thu, 22 Apr 2010 21:55:46 +0530
> From: Karan Grover <[hidden email]>
> Reply-To: "Ubuntu user technical support, not for general discussions"
>     <[hidden email]>
> To: "Ubuntu user technical support, not for general discussions"
>     <[hidden email]>
> Subject: Re: widget for broadband speed
>
> [hidden email] wrote:
>> my broad band speed fluctiates like crazy was wondering if there is a
>> widgget or some such that could sit on the corner of the screen that will
>> show the current download/upload speed????????
>>
>>
>> Bob
>>
>>
> there's one in KDE
>
> --
> ubuntu-users mailing list
> [hidden email]
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Dotan Cohen
In reply to this post by C de-Avillez-2
Thank you Kevin, Hal, and C for the ideas. I will experiment with them
and see what I can come up with.


--
Dotan Cohen

http://bido.com
http://what-is-what.com

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Karan Grover
Dotan Cohen wrote:
> Thank you Kevin, Hal, and C for the ideas. I will experiment with them
> and see what I can come up with.
>
>
>  
cheers mate.

It was Karan :)

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Hal Burgiss
In reply to this post by C de-Avillez-2
On Thu, Apr 22, 2010 at 11:55 AM, C de-Avillez <[hidden email]> wrote:

> On Thu, 2010-04-22 at 11:28 -0400, Hal Burgiss wrote:
>> On Thu, Apr 22, 2010 at 11:12 AM, Dotan Cohen <[hidden email]> wrote:
>> > A user needs to run a specific application as root. I have finally
>> > convinced him not to run the whole desktop as root, but now he must
>> > precede the command to run the application with "sudo -i".
>>
>> Sounds like this is what you guys need:
>>
>> http://www.cyberciti.biz/faq/unix-bsd-linux-setuid-file/
>
> Setting a programme 'setuid' to root is an extreme action, and should
> not be done without a full analysis of the risks.

There is some risk in everything, so yes, don't do something stupid. I
have 43 programs on my system that are suid root (all from Ubuntu),
including things like the beep command, so there is a place for
non-root users to run things as root. I'll leave it to the OP to
decide the risks vs benefits.

--
Hal

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Dotan Cohen
In reply to this post by Karan Grover
> cheers mate.
>
> It was Karan :)
>

Oops, sorry! Well, I've been called worse!


--
Dotan Cohen

http://bido.com
http://what-is-what.com

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Not require sudo for running specific application as root

Dave Howorth
In reply to this post by Dotan Cohen
Dotan Cohen wrote:
> Thank you Kevin, Hal, and C for the ideas. I will experiment with them
> and see what I can come up with.

I think you can do what you want just by editing /etc/sudoers but I
don't have time to check, sorry.

Cheers, Dave

--
ubuntu-users mailing list
[hidden email]
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
Loading...