Results 1 to 9 of 9

Thread: UIDs and servers

  1. #1
    Join Date
    Jun 2010
    Beans
    213
    Distro
    Ubuntu 11.04 Natty Narwhal

    UIDs and servers

    Hi,
    I have the singular necessity of getting the user identifier of the user accessing my server. I am writing this myself, it is intended to be a local server. However, I need to strictly differentiate between users, with out the users themselves being involved. Also, all of this needs to happen through a browser. I would appreciate any tips.
    Praising my Savior all the day long:
    Micah Nordland

  2. #2
    Join Date
    Nov 2005
    Location
    Sendai, Japan
    Beans
    11,296
    Distro
    Kubuntu

    Re: UIDs and servers

    Define 'accessing'.
    「明後日の夕方には帰ってるからね。」


  3. #3
    Join Date
    Dec 2008
    Location
    Deep Woods of PA
    Beans
    699
    Distro
    Kubuntu 11.10 Oneiric Ocelot

    Re: UIDs and servers

    Quote Originally Posted by mpnordland View Post
    Hi,
    I have the singular necessity of getting the user identifier of the user accessing my server. I am writing this myself, it is intended to be a local server. However, I need to strictly differentiate between users, with out the users themselves being involved. Also, all of this needs to happen through a browser. I would appreciate any tips.
    I'm kinda confused as to what exactly you are trying to do... From what I can gather from your post you can do this easily with
    Code:
    $ last
    $ w
    or
    Code:
    $ who
    If you need to do this in C, C++, Perl there is a
    Code:
    getuid()
    function beyond this you need to be a little more specific.
    Regards,

    Karlson

  4. #4
    Join Date
    Jun 2010
    Beans
    213
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: UIDs and servers

    Ok, time to facepalm and remind myself of how to ask programming questions.
    *facepalms*
    Now that we've got that out of the way, The "server" is a local proxy server that tracks internet usage. The idea is to help people break internet addictions by emailing flagged urls to their partner of choice. The thing is, is that linux is a multi-user system, hence the need to differentiate between users so that we don't have embarrassing mix ups. To help the users stay accountable, it is necessary to hide all of the authentication from the user. It is also needful to make it difficult to masquerade as another user. And, since it is a proxy server, you have to figure out who the user is from the browser. Cookies may be an option, but I'd like a more fool proof way.
    Praising my Savior all the day long:
    Micah Nordland

  5. #5
    Join Date
    Jun 2010
    Beans
    213
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: UIDs and servers

    bUMP
    Praising my Savior all the day long:
    Micah Nordland

  6. #6
    Join Date
    Dec 2008
    Location
    Deep Woods of PA
    Beans
    699
    Distro
    Kubuntu 11.10 Oneiric Ocelot

    Re: UIDs and servers

    Quote Originally Posted by mpnordland View Post
    Ok, time to facepalm and remind myself of how to ask programming questions.
    *facepalms*
    Now that we've got that out of the way, The "server" is a local proxy server that tracks internet usage. The idea is to help people break internet addictions by emailing flagged urls to their partner of choice. The thing is, is that linux is a multi-user system, hence the need to differentiate between users so that we don't have embarrassing mix ups. To help the users stay accountable, it is necessary to hide all of the authentication from the user. It is also needful to make it difficult to masquerade as another user. And, since it is a proxy server, you have to figure out who the user is from the browser. Cookies may be an option, but I'd like a more fool proof way.
    I have to ask what proxy server are you using? Squid probably will give you the information you need. I don't know if you will need more than that.
    Regards,

    Karlson

  7. #7
    Join Date
    Jun 2010
    Beans
    213
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: UIDs and servers

    I'm writing my own for various reasons, the primary one being that I need to hand off the urls to another process. What I'm looking for is the user id, or the user name of whoever owns the browser process that is connecting to my proxy server.
    Praising my Savior all the day long:
    Micah Nordland

  8. #8
    Join Date
    May 2007
    Location
    East Yorkshire, England
    Beans
    Hidden!

    Re: UIDs and servers

    As the browser will be connecting to the proxy server via a network (even if run on the same computer), you can't just get the UID. You could differentiate between users based on their IP or user-agent (or one of the plethora of other headers).
    Website | Blog | The Arch Hurd Project

    If you want to ask about something I posted, send a PM, as I don't watch many threads

  9. #9
    Join Date
    Jun 2010
    Beans
    213
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: UIDs and servers

    So there is absolutely no way to figure out the user id from the browser?
    Praising my Savior all the day long:
    Micah Nordland

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •