LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-14-2002, 10:05 AM   #1
toxic53
Member
 
Registered: Sep 2001
Posts: 30

Rep: Reputation: 15
Looging out using C?


Does anyone know how to logout using C. Or the steps I need to take to logout, I tried System calls, but since the program is still running it wont log me out...
 
Old 02-14-2002, 12:28 PM   #2
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
You're going to have to be more specific than that.

logout out of what?

KDE? GNOME? X? Linux? some-other-application?
 
Old 02-14-2002, 01:29 PM   #3
toxic53
Member
 
Registered: Sep 2001
Posts: 30

Original Poster
Rep: Reputation: 15
good question

I dont know the proper name of it but let me try to explain, I'm trying to write code to simulate the login in screen:
(i.e.
Welcome to Linux 2.4.12.
login:
)

so I dont know the proper name of this mode but basically my program is running the user thinks he is going to log in but is really my program running, I then grab their log in and password but I want the system to log me out so they wont mess w/ my account... I dont have root access i dont have any access except to my account this is a school acount and basically after the program ends I want it to log me out so the "real" log in screen comes out.
 
Old 02-14-2002, 01:51 PM   #4
kervin
Member
 
Registered: Jan 2002
Location: Melbourne, FL.
Distribution: redhat
Posts: 168

Rep: Reputation: 31
well at least you're honest

I must say I got a kick out of your plan. Truth is, it's been done before, and the code is probably floating on the web.

But not to sould to "preachy" but do you really think it's worth the trouble you might get into?

Is that fair to the user who's password you stole?

Don't do it, it's not worth the effort. Try thinking of a constructive hack instead.

--Kervin
 
Old 02-14-2002, 01:53 PM   #5
toxic53
Member
 
Registered: Sep 2001
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks

I need to get this asshole though but I will consider it... oh and incase anyone is wondering I figured it out... just run it as

exec program.o

after its done it logs you out...
 
Old 02-14-2002, 02:09 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
hmm, stuff preachy, that's a stupid and nasty thing to do.
go away.
thankyou
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i am not able to log in graphical mode. i am getting the looging screen. nbhalala Linux - General 3 12-07-2004 04:11 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration