login example

N

Nick Keighley

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!]
 
G

Giuseppe Longo

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
 
K

Keith Thompson

Giuseppe Longo said:
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.
 
N

Nick Keighley

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?
 
G

Giuseppe Longo

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...
 
J

Joachim Schmitz

Giuseppe said:
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
 
N

Nomen Nescio

#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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top