getting user id (from an arbitrary sys user)

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gerardo Herzig

    #1

    getting user id (from an arbitrary sys user)

    hi all. What i need to know is if there is some function like
    os.getuid(), but taking an argument (the username, off course), so i can
    do getuid('myuser' )

    Thanks you dudes!

    Gerardo
  • Tina I

    #2
    Re: getting user id (from an arbitrary sys user)

    Gerardo Herzig wrote:
    hi all. What i need to know is if there is some function like
    os.getuid(), but taking an argument (the username, off course), so i can
    do getuid('myuser' )
    >
    Thanks you dudes!
    >
    Gerardo
    How about simply:

    import commands
    userid = commands.getout put("id -u username")

    Comment

    Working...