Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-23 Thread Piet van Oostrum
> Krishnakant (K) wrote: >K> On Thu, 2009-07-23 at 13:50 +0200, paul wrote: >>> If the user running python program is allowed to call setuid() then yes. >>> >K> NO, i don't think i can do that. I am getting opperation not permitted. >K> Any ways I think probably subprocess will have to sor

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-23 Thread paul
Krishnakant schrieb: On Thu, 2009-07-23 at 13:50 +0200, paul wrote: If the user running python program is allowed to call setuid() then yes. NO, i don't think i can do that. I am getting opperation not permitted. Any ways I think probably subprocess will have to sort it out. Did you try r

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-23 Thread Krishnakant
On Thu, 2009-07-23 at 13:50 +0200, paul wrote: > If the user running python program is allowed to call setuid() then yes. > NO, i don't think i can do that. I am getting opperation not permitted. Any ways I think probably subprocess will have to sort it out. > Did you try running "sudo -u post

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-23 Thread Piet van Oostrum
> Krishnakant (K) wrote: >K> On Thu, 2009-07-23 at 00:17 +0200, Piet van Oostrum wrote: >>> Being a sudoer is not a privilege to issue the os.setuid system call. It >>> is only a permission to use the sudo command. >>> >K> Yes, So I would like to know if python can change the user to some ot

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-23 Thread paul
Krishnakant schrieb: On Thu, 2009-07-23 at 00:17 +0200, Piet van Oostrum wrote: Being a sudoer is not a privilege to issue the os.setuid system call. It is only a permission to use the sudo command. Yes, So I would like to know if python can change the user to some other non-privileged user du

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-23 Thread Krishnakant
On Thu, 2009-07-23 at 00:17 +0200, Piet van Oostrum wrote: > Being a sudoer is not a privilege to issue the os.setuid system call. It > is only a permission to use the sudo command. > Yes, So I would like to know if python can change the user to some other non-privileged user during the script exe

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-22 Thread Martin P. Hellwig
Krishnakant wrote: I've seen a method before in a MS cmd script (MakeMeAdmin.cmd) for the purpose of temporarily elevating your rights but remaining the same user. There was a need trick in that the script checks itself on what credentials it runs, if it is not the appropriate one it will ca

Re: challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-22 Thread Piet van Oostrum
> Krishnakant (K) wrote: >K> hello all, >K> This is a real challenge and I don't know if a solution even exists for >K> this or not. >K> I am writing an application which I run as my usual user on ubuntu. >K> the usernake is let's say kk and it has sudo permission (meaning the >K> user is in

challenging problem for changing to a dedicated non-privileged user within a script.

2009-07-22 Thread Krishnakant
hello all, This is a real challenge and I don't know if a solution even exists for this or not. I am writing an application which I run as my usual user on ubuntu. the usernake is let's say kk and it has sudo permission (meaning the user is in the sudoers list ). now when i do python myscript.py