Hi, Can xm command be run as a user without root access? When I tried as a user, it says I dont have super user privilege. Thanks, Dhanesh. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
I''m going to go out on a limb here and say (without testing) that you could set up sudo? Sudo will allow you to configures users who can run commands (and what commands they can run) as another user (including of course root). Some distros insist this is the only way to run root commands - lots of options, but that might be the best thing to look at? HTH m From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On Behalf Of Jaya Dhanesh Sent: June 5, 2013 9:03 AM To: xen-users Subject: [Xen-users] xm command as non-root Hi, Can xm command be run as a user without root access? When I tried as a user, it says I dont have super user privilege. Thanks, Dhanesh. _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
On Wed, Jun 05, 2013 at 06:37:41PM +0000, mitch@bitblock.net wrote:> I''m going to go out on a limb here and say (without testing) that you could set up sudo? > Sudo will allow you to configures users who can run commands (and what commands they can run) as another user (including of course root). > Some distros insist this is the only way to run root commands - lots of options, but that might be the best thing to look at? > HTH > m >Yes, sudo works perfectly for xm / xl. In fact, there are ways that you can configure sudo to not require a password on certain commands. It reduces the security of your system (obviously), but if you only set it up for commands that can''t do damage (e.g. xl list), you should be OK. --Sean
Thanks folks, I am aware of sudo but wont be able to take that option. Is there any other way? On 06/06/2013 12:11 AM, Sean Greenslade wrote:> On Wed, Jun 05, 2013 at 06:37:41PM +0000, mitch@bitblock.net wrote: >> I''m going to go out on a limb here and say (without testing) that you could set up sudo? >> Sudo will allow you to configures users who can run commands (and what commands they can run) as another user (including of course root). >> Some distros insist this is the only way to run root commands - lots of options, but that might be the best thing to look at? >> HTH >> m >> > Yes, sudo works perfectly for xm / xl. In fact, there are ways that you > can configure sudo to not require a password on certain commands. It > reduces the security of your system (obviously), but if you only set it > up for commands that can''t do damage (e.g. xl list), you should be OK. > > --Sean
Here you can find information on what needs to be done :D http://bit.ly/11GTivX real question is why you want to do it? If you use this method everyone, or a specified group will have the right to run the file. 2013/6/6 Jaya Dhanesh <jaya.dhanesh@ericsson.com>> Thanks folks, I am aware of sudo but wont be able to take that option. Is > there any other way? > > On 06/06/2013 12:11 AM, Sean Greenslade wrote: > >> On Wed, Jun 05, 2013 at 06:37:41PM +0000, mitch@bitblock.net wrote: >> >>> I''m going to go out on a limb here and say (without testing) that you >>> could set up sudo? >>> Sudo will allow you to configures users who can run commands (and what >>> commands they can run) as another user (including of course root). >>> Some distros insist this is the only way to run root commands - lots of >>> options, but that might be the best thing to look at? >>> HTH >>> m >>> >>> Yes, sudo works perfectly for xm / xl. In fact, there are ways that you >> can configure sudo to not require a password on certain commands. It >> reduces the security of your system (obviously), but if you only set it >> up for commands that can''t do damage (e.g. xl list), you should be OK. >> >> --Sean >> > > > > ______________________________**_________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users >-- Pozdrawiam Jakub Kulesza _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
Setuid / setgid only works if a program is designed to work that way though - right? So I''m presuming you know that xm / xl are? A lot of programs used to NOT go to that extra effort - I guess there are more opportunities for abuse right? It''s kind of why sudo got created - sort of a wrapper for the functionality iirc. I never would have expected xm/xl to be ready for that or thought it would have been in the man or something :) Maybe it is somewhere. Cheers! M From: xen-users-bounces@lists.xen.org [mailto:xen-users-bounces@lists.xen.org] On Behalf Of Jakub Kulesza Sent: June 6, 2013 5:07 AM Cc: xen-users Subject: Re: [Xen-users] xm command as non-root Here you can find information on what needs to be done :D http://bit.ly/11GTivX real question is why you want to do it? If you use this method everyone, or a specified group will have the right to run the file. 2013/6/6 Jaya Dhanesh <jaya.dhanesh@ericsson.com<mailto:jaya.dhanesh@ericsson.com>> Thanks folks, I am aware of sudo but wont be able to take that option. Is there any other way? On 06/06/2013 12:11 AM, Sean Greenslade wrote: On Wed, Jun 05, 2013 at 06:37:41PM +0000, mitch@bitblock.net<mailto:mitch@bitblock.net> wrote: I''m going to go out on a limb here and say (without testing) that you could set up sudo? Sudo will allow you to configures users who can run commands (and what commands they can run) as another user (including of course root). Some distros insist this is the only way to run root commands - lots of options, but that might be the best thing to look at? HTH m Yes, sudo works perfectly for xm / xl. In fact, there are ways that you can configure sudo to not require a password on certain commands. It reduces the security of your system (obviously), but if you only set it up for commands that can''t do damage (e.g. xl list), you should be OK. --Sean _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org<mailto:Xen-users@lists.xen.org> http://lists.xen.org/xen-users -- Pozdrawiam Jakub Kulesza _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users
In this case I would recommend: - configuring sudo to run xm as root without password - setting up a script named "xm" in your /usr/bin/local that would do "sudo /usr/sbin/xm $@" since xm is in /usr/sbin and normal users won''t reach there and you''re done! 2013/6/6 mitch@bitblock.net <mitch@bitblock.net>> Setuid / setgid only works if a program is designed to work that way > though – right?**** > > So I’m presuming you know that xm / xl are?**** > > A lot of programs used to NOT go to that extra effort – I guess there are > more opportunities for abuse right?**** > > It’s kind of why sudo got created – sort of a wrapper for the > functionality iirc.**** > > I never would have expected xm/xl to be ready for that or thought it would > have been in the man or something J**** > > Maybe it is somewhere.**** > > Cheers!**** > > M**** > > ** ** > > *From:* xen-users-bounces@lists.xen.org [mailto: > xen-users-bounces@lists.xen.org] *On Behalf Of *Jakub Kulesza > *Sent:* June 6, 2013 5:07 AM > *Cc:* xen-users > *Subject:* Re: [Xen-users] xm command as non-root**** > > ** ** > > Here you can find information on what needs to be done :D**** > > ** ** > > http://bit.ly/11GTivX**** > > ** ** > > real question is why you want to do it? If you use this method everyone, > or a specified group will have the right to run the file.**** > > ** ** > > 2013/6/6 Jaya Dhanesh <jaya.dhanesh@ericsson.com>**** > > Thanks folks, I am aware of sudo but wont be able to take that option. Is > there any other way?**** > > > On 06/06/2013 12:11 AM, Sean Greenslade wrote:**** > > On Wed, Jun 05, 2013 at 06:37:41PM +0000, mitch@bitblock.net wrote:**** > > I''m going to go out on a limb here and say (without testing) that you > could set up sudo? > Sudo will allow you to configures users who can run commands (and what > commands they can run) as another user (including of course root). > Some distros insist this is the only way to run root commands - lots of > options, but that might be the best thing to look at? > HTH > m**** > > Yes, sudo works perfectly for xm / xl. In fact, there are ways that you > can configure sudo to not require a password on certain commands. It > reduces the security of your system (obviously), but if you only set it > up for commands that can''t do damage (e.g. xl list), you should be OK. > > --Sean**** > > > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xen.org > http://lists.xen.org/xen-users**** > > > > **** > > ** ** > > -- > Pozdrawiam > Jakub Kulesza **** >-- Pozdrawiam Jakub Kulesza _______________________________________________ Xen-users mailing list Xen-users@lists.xen.org http://lists.xen.org/xen-users