login example

Discussion in 'C Programming' started by Giuseppe Longo, Aug 8, 2012.

  1. Hello,
    anyone can show me a simple login example in C?

    Thanks,
    Regards.
    Giuseppe Longo, Aug 8, 2012
    #1
    1. Advertising

  2. On Aug 8, 8:45 am, Giuseppe Longo <> wrote:

    > anyone can show me a simple login example in C?


    what's a "login example"? A program that logs itself in?
    How would it do that? What is it running on before it logs
    in? Possibly you might be thinking of some sort of remote
    login. Try rsh maybe. Rethink your question and ask it
    again on /comp.unix.programmer. [hi kenny!]
    Nick Keighley, Aug 8, 2012
    #2
    1. Advertising

  3. On 8 Ago, 10:04, Nick Keighley <>
    wrote:
    > On Aug 8, 8:45 am, Giuseppe Longo <> wrote:
    >
    > > anyone can show me a simple login example in C?

    >
    > what's a "login example"? A program that logs itself in?
    > How would it do that? What is it running on before it logs
    > in? Possibly you might be thinking of some sort of remote
    > login. Try rsh maybe.  Rethink your question and ask it
    > again on /comp.unix.programmer. [hi kenny!]


    Hi Nick,
    Yes, a program that logs itself in.

    Thanks
    Giuseppe Longo, Aug 8, 2012
    #3
  4. Giuseppe Longo <> writes:
    > On 8 Ago, 10:04, Nick Keighley <>
    > wrote:
    >> On Aug 8, 8:45 am, Giuseppe Longo <> wrote:
    >>
    >> > anyone can show me a simple login example in C?

    >>
    >> what's a "login example"? A program that logs itself in?
    >> How would it do that? What is it running on before it logs
    >> in? Possibly you might be thinking of some sort of remote
    >> login. Try rsh maybe.  Rethink your question and ask it
    >> again on /comp.unix.programmer. [hi kenny!]

    >
    > Hi Nick,
    > Yes, a program that logs itself in.


    A program that logs itself into what, exactly?

    If I understand you correctly, C doesn't provide any mechanisms for what
    you want to do. I suggest posting in a newsgroup that deals with
    whatever operating system you're using, and provide more informationa
    about what you're trying to do.

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Will write code for food.
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
    Keith Thompson, Aug 8, 2012
    #4
  5. On Aug 8, 9:19 am, Giuseppe Longo <> wrote:
    > On 8 Ago, 10:04, Nick Keighley <>
    > wrote:
    >
    > > On Aug 8, 8:45 am, Giuseppe Longo <> wrote:

    >
    > > > anyone can show me a simple login example in C?

    >
    > > what's a "login example"? A program that logs itself in?
    > > How would it do that? What is it running on before it logs
    > > in? Possibly you might be thinking of some sort of remote
    > > login. Try rsh maybe.  Rethink your question and ask it
    > > again on /comp.unix.programmer. [hi kenny!]

    >
    > Yes, a program that logs itself in.


    and what about the other questions and the suggestion?
    Nick Keighley, Aug 8, 2012
    #5
  6. Ok, im trying to explain better: im writing a little code that
    interacts with user logged.
    Example:

    Im log-in in my linux box, my programs runs, and the problem was here:
    There is a method to get info about the user logged?
    Info about, home path, uid, gid...
    Giuseppe Longo, Aug 8, 2012
    #6
  7. Giuseppe Longo wrote:
    > Ok, im trying to explain better: im writing a little code that
    > interacts with user logged.
    > Example:
    >
    > Im log-in in my linux box, my programs runs, and the problem was here:
    > There is a method to get info about the user logged?
    > Info about, home path, uid, gid...


    Yes, there is, in POSIX: getpwuid(), getpwent(), getpwnam(). But neither is
    topical here, so better go to comp.unix.programmer as others told you
    already...

    bye, Jojo
    Joachim Schmitz, Aug 8, 2012
    #7
  8. Giuseppe Longo

    Nomen Nescio Guest

    Keith Thompson <> wrote:

    > Giuseppe Longo <> writes:
    > > On 8 Ago, 10:04, Nick Keighley <>
    > > wrote:
    > >> On Aug 8, 8:45 am, Giuseppe Longo <> wrote:
    > >>
    > >> > anyone can show me a simple login example in C?


    #include <login.h>

    int main() {
    login();
    }

    > >>
    > >> what's a "login example"? A program that logs itself in?
    > >> How would it do that? What is it running on before it logs
    > >> in? Possibly you might be thinking of some sort of remote
    > >> login. Try rsh maybe.  Rethink your question and ask it
    > >> again on /comp.unix.programmer. [hi kenny!]

    > >
    > > Hi Nick,
    > > Yes, a program that logs itself in.


    There you have it. Logging out is left as a (futile) exercise to the reader.

    > A program that logs itself into what, exactly?


    Into whatever, dude! ;-)

    > I suggest posting in a newsgroup that deals with whatever operating system


    comp.os.imaginary.os

    > you're using, and provide more informationa about what you're trying to
    > do.


    Didn't realize you spoke Italian. You're multi-talented! I'll have 2 slices
    and a coke, thank you very much.
    Nomen Nescio, Aug 8, 2012
    #8
  9. Giuseppe Longo

    Guest

    On Wednesday, August 8, 2012 3:01:56 PM UTC+2, Nomen Nescio wrote:
    > Keith Thompson <> wrote:
    >
    > > you're using, and provide more informationa about what you're trying to
    > > do.

    >
    > Didn't realize you spoke Italian. You're multi-talented! I'll have 2 slices
    > and a coke, thank you very much.


    ahah.
    :(
    , Aug 8, 2012
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Klemt
    Replies:
    0
    Views:
    370
    Andreas Klemt
    Apr 17, 2005
  2. =?Utf-8?B?bmljaw==?=

    Any Asp.Net 2.0 login control example?

    =?Utf-8?B?bmljaw==?=, Jun 18, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    4,210
    clintonG
    Jun 18, 2006
  3. Sam Roberts
    Replies:
    15
    Views:
    277
    Sam Roberts
    Feb 7, 2005
  4. chhenning
    Replies:
    5
    Views:
    109
    Dave Thomas
    Jan 17, 2007
  5. login example

    , May 29, 2007, in forum: Perl Misc
    Replies:
    0
    Views:
    107
Loading...

Share This Page