Re: How do I add users using Python scripts on a Linux machine

2007-01-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Piet van Oostrum wrote: > Lawrence D'Oliveiro <[EMAIL PROTECTED]> (LD) wrote: > In message <[EMAIL PROTECTED]>, Piet van Oostrum wrote: > >> The scenario is as follows: Suppose the script starts with the line: >> #!/usr/bin/python >> >> (using #!/usr/bin/env pytho

Re: How do I add users using Python scripts on a Linux machine

2007-01-06 Thread Piet van Oostrum
> Lawrence D'Oliveiro <[EMAIL PROTECTED]> (LD) wrote: >LD> No it wouldn't. This security hole was fixed years ago. How? -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [EMAIL PROTECTED] -- http://mail.python.org/mailman/listinfo/p

Re: How do I add users using Python scripts on a Linux machine

2007-01-04 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Piet van Oostrum wrote: > The scenario is as follows: Suppose the script starts with the line: > #!/usr/bin/python > > (using #!/usr/bin/env python would be disastrous because the user could > supply his own `python interpreter' in his PATH.) > > Now a malicious u

Re: How do I add users using Python scripts on a Linux machine

2007-01-04 Thread Piet van Oostrum
> Sebastian 'lunar' Wiesner <[EMAIL PROTECTED]> (SW) wrote: >SW> I don't see a problem with SUID on scripts. If you restrict write access >SW> to the owner, modification is hardly possible. >SW> However, if you allow world-wide write access to your binaries and >SW> scripts, both can easily b

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread [EMAIL PROTECTED]
I find that I can often live with a 0-60 sec. pause. and set command in a queue like then have a cron that runs once a min as the user you need to run this on that looks at the queue and sees if there are any pending I often use a sql database for this -- http://mail.python.org/mailman/listinfo

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread Sebastian 'lunar' Wiesner
[ Ivan Voras <[EMAIL PROTECTED]> ] > Sebastian 'lunar' Wiesner wrote: >> Carsten Haese <[EMAIL PROTECTED]> typed > >>> I don't think that that has anything to do with Linux or not. The >>> script is not the actual executable, hence its suid bit is >>> irrelevant. >> >> I don't think so. From wha

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread Ivan Voras
Sebastian 'lunar' Wiesner wrote: > Carsten Haese <[EMAIL PROTECTED]> typed >> I don't think that that has anything to do with Linux or not. The >> script is not the actual executable, hence its suid bit is irrelevant. > > I don't think so. From what I know, the script is passed as executable > to

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread Sebastian 'lunar' Wiesner
Piet van Oostrum <[EMAIL PROTECTED]> typed >> Sebastian 'lunar' Wiesner <[EMAIL PROTECTED]> (SW) wrote: > >>SW> Linux seems to ignore SUID bit on scripts: > > The reason is that obeying SUID bits on scripts would be a security > risk. I don't see a problem with SUID on scripts. If you restr

Re: How do I add users using Python scripts on a Linux machine

2007-01-03 Thread Tim Roberts
"Ramdas" <[EMAIL PROTECTED]> wrote: > >I need to add users from a web interface for a web server, which runs >only Python. I need to add users, set quotas and in future even look at >managing ip tables to limit bandwidth. > >I know os.system(), but this has to be done through a form entry >through

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Piet van Oostrum
> Sebastian 'lunar' Wiesner <[EMAIL PROTECTED]> (SW) wrote: >SW> Linux seems to ignore SUID bit on scripts: The reason is that obeying SUID bits on scripts would be a security risk. -- Piet van Oostrum <[EMAIL PROTECTED]> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4] Private email: [

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Ravi Teja
> > > > How about invoking scripts with SUID root set? > > Linux seems to ignore SUID bit on scripts: Yes. My bad. The work around was to use native launchers. I don't remember the details. Perhaps with the interpreter embedded to launch it in-process and to hard code the script paths (or at least

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Sebastian 'lunar' Wiesner
Carsten Haese <[EMAIL PROTECTED]> typed > On Tue, 2007-01-02 at 17:17 +0100, Sebastian 'lunar' Wiesner wrote: >> Ravi Teja <[EMAIL PROTECTED]> typed >> >> > >> > Ivan Voras wrote: >> >> Ramdas wrote: >> >> > Well, >> >> > >> >> > I need to add users from a web interface for a web server, which >

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Carsten Haese
On Tue, 2007-01-02 at 17:17 +0100, Sebastian 'lunar' Wiesner wrote: > Ravi Teja <[EMAIL PROTECTED]> typed > > > > > Ivan Voras wrote: > >> Ramdas wrote: > >> > Well, > >> > > >> > I need to add users from a web interface for a web server, which > >> > runs only Python. I need to add users, set qu

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Sebastian 'lunar' Wiesner
Ravi Teja <[EMAIL PROTECTED]> typed > > Ivan Voras wrote: >> Ramdas wrote: >> > Well, >> > >> > I need to add users from a web interface for a web server, which >> > runs only Python. I need to add users, set quotas and in future >> > even look at managing ip tables to limit bandwidth. >> > >> >

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Jan Dries
Ivan Voras wrote: > Ramdas wrote: >> Well, >> >> I need to add users from a web interface for a web server, which runs >> only Python. I need to add users, set quotas and in future even look at >> managing ip tables to limit bandwidth. >> >> I know os.system(), but this has to be done through a for

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Ravi Teja
Ivan Voras wrote: > Ramdas wrote: > > Well, > > > > I need to add users from a web interface for a web server, which runs > > only Python. I need to add users, set quotas and in future even look at > > managing ip tables to limit bandwidth. > > > > I know os.system(), but this has to be done throu

Re: How do I add users using Python scripts on a Linux machine

2007-01-02 Thread Ivan Voras
Ramdas wrote: > Well, > > I need to add users from a web interface for a web server, which runs > only Python. I need to add users, set quotas and in future even look at > managing ip tables to limit bandwidth. > > I know os.system(), but this has to be done through a form entry > through a web i

Re: How do I add users using Python scripts on a Linux machine

2007-01-01 Thread Ramdas
ng > requirement or something on top. > > -h > > On 01/01/07, Daniel Klein <[EMAIL PROTECTED]> wrote: > > On 1 Jan 2007 11:33:42 -0800, "Ramdas" <[EMAIL PROTECTED]> wrote: > > > > >How do I add users using Python scripts on a Linux machine? >

Re: How do I add users using Python scripts on a Linux machine

2007-01-01 Thread Hari Sekhon
ECTED]> wrote: > On 1 Jan 2007 11:33:42 -0800, "Ramdas" <[EMAIL PROTECTED]> wrote: > > >How do I add users using Python scripts on a Linux machine? > > > >Someone has a script? > > This should be as easy as something like: > > os.system(&quo

Re: How do I add users using Python scripts on a Linux machine

2007-01-01 Thread Daniel Klein
On 1 Jan 2007 11:33:42 -0800, "Ramdas" <[EMAIL PROTECTED]> wrote: >How do I add users using Python scripts on a Linux machine? > >Someone has a script? This should be as easy as something like: os.system("/usr/sbin/useradd -m -d /home/newuser -s /bin/ksh&quo

How do I add users using Python scripts on a Linux machine

2007-01-01 Thread Ramdas
How do I add users using Python scripts on a Linux machine? Someone has a script? -- http://mail.python.org/mailman/listinfo/python-list