Grokbase Groups Python tutor May 2011
FAQ
I am needing to run a Python networked application with a specific set of credentials, Windows AD, rather than the user's own so that the app can access the needed CIFS shares. Where should I start?

--Bill

Sent from my iPhone

Search Discussions

  • Tim Golden at May 3, 2011 at 7:02 pm

    On 03/05/2011 5:35 PM, Bill Allen wrote:
    I am needing to run a Python networked application with a specific
    set of credentials, Windows AD, rather than the user's own so that
    the app can access the needed CIFS shares. Where should I start?
    By saying what operating system you're running on, which will
    make quite a bit of difference to the answer.

    TJG
  • Bill Allen at May 3, 2011 at 11:56 pm
    I am running on MS Windows XP & Server 2003.


    Sent from my iPhone
    On May 3, 2011, at 12:02, Tim Golden wrote:
    On 03/05/2011 5:35 PM, Bill Allen wrote:
    I am needing to run a Python networked application with a specific
    set of credentials, Windows AD, rather than the user's own so that
    the app can access the needed CIFS shares. Where should I start?
    By saying what operating system you're running on, which will
    make quite a bit of difference to the answer.

    TJG
    _______________________________________________
    Tutor maillist - Tutor at python.org
    To unsubscribe or change subscription options:
    http://mail.python.org/mailman/listinfo/tutor
  • Alan Gauld at May 3, 2011 at 11:18 pm
    "Bill Allen" <wallenpb at gmail.com> wrote
    I am needing to run a Python networked application
    with a specific set of credentials, Windows AD, rather
    than the user's own so that the app can access the
    needed CIFS shares. Where should I start?
    Since its more a Windows question than a Python
    one I suggest you try a Windows forum. comp.python.windows
    might be worth a try? Or even the ctypes group?

    While we do have some Windows users here its
    not really a python nwewbie type question.

    Alan G.
  • Tim Golden at May 4, 2011 at 7:57 am

    On 04/05/2011 00:18, Alan Gauld wrote:
    Since its more a Windows question than a Python one I suggest you try a
    Windows forum. comp.python.windows might be worth a try? Or even the
    ctypes group?

    While we do have some Windows users here its not really a python nwewbie
    type question.
    True enough. I should be able to help nonetheless; but I would second
    the recommendation to post this kind of question to the python-win32
    mailing list:

    http://mail.python.org/mailman/listinfo/python-win32

    where you'll get the benefit of a lot more knowledge and experience
    in the Windows area.

    You could obviously achieve this *outside* Python -- ie by using
    RunAs to launch a process as a different user. This may or may not
    suit your case. If you want to do the switch from within the Python
    process, you'll need to use the LogonUser [1] and
    ImpersonateLoggedOnUser [2] APIs which are both available in the
    pywin32 win32security module.

    If you only want to make a connection under this alternative identity
    (and not to do anything locally) then you could connect transiently
    with specific credentials. To do this you'd use the WNetAddConnection
    family of APIs [3].

    Feel free to come back (or post to the python-win32 list) for more
    information

    TJG

    [1] http://msdn.microsoft.com/en-us/library/aa378184%28v=vs.85%29.aspx

    [2] http://msdn.microsoft.com/en-us/library/aa378612%28v=vs.85%29.aspx

    [3] http://msdn.microsoft.com/en-us/library/aa385418%28v=vs.85%29.aspx
  • Bill Allen at May 4, 2011 at 3:40 pm

    On May 4, 2011, at 0:57, Tim Golden wrote:
    On 04/05/2011 00:18, Alan Gauld wrote:
    Since its more a Windows question than a Python one I suggest you try a
    Windows forum. comp.python.windows might be worth a try? Or even the
    ctypes group?

    While we do have some Windows users here its not really a python nwewbie
    type question.


    Feel free to come back (or post to the python-win32 list) for more
    information

    TJG
    Tim, yes Alan is right about that. I was unaware of the python-win32 group. I think you have given me a good place to start on this and I really appreciate the help.

    --Bill

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouptutor @
categoriespython
postedMay 3, '11 at 4:35p
activeMay 4, '11 at 3:40p
posts6
users3
websitepython.org

People

Translate

site design / logo © 2022 Grokbase