LinuxQuestions.org
Help answer threads with 0 replies.
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 10-03-2007, 10:13 PM   #1
limit_me
LQ Newbie
 
Registered: May 2007
Location: Kathmandu, Nepal
Distribution: Ubuntu 8.04
Posts: 10

Rep: Reputation: 0
C language and Linux Users. How to?


Hi,

I am working on a project that captures the data from the camera and stores in the harddisk. in this project i am faced with logging with username and password to the linux machine that does all this work. the logging is to be done from machine that has windows and a small application is developed using visual basic.

In this application one is supplied with login form. so when one enters his /her information then only he can log in to the linux machine.

Now the real problem is the user authentication. how can i integrate the user's information in linux machine to my program. I am using C programming language for the linux machine.

Is there any sites or tutorials or forums for user management using c programming language..

Any help will be greatly appreciated.

Thanks.

PS: Sorry for my bad english.
 
Old 10-04-2007, 05:58 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
So, if I understand your question correctly, the camera, its drivers and the application that grabs and stores images from it are to run on the Linux host, but users that access the camera application will be using Windows. You want to know how to control and log data from the linux hosted camera application through a Windows user interface.

If this is a correct summary, then I would suggest the following: run an X server (see list at http://www.rahul.net/kenton/xsites.html#XMicrosoft) and SSH client on your Windows system(s), and simply access the Linux host application that way. Then you only have to develop code on one platform, and any client with X can access it. This also solves your authentication problem, by using the existing and well known SSH/SSL system.

Alternatively, you will have to write a client-server application, where the server runs on the Linux host, and the client runs on the Windows hosts. This is probably best done using TCP or UDP to pass messages between the host applications. Your application can be free to define whatever protocol you wish to devise for this purpose. I don't think you provided enough detail for anyone to give a very detailed reply.

A good online C tutorial with a somewhat Unix/Linux angle is http://www.cs.cf.ac.uk/Dave/C/.

--- rod.
 
Old 10-04-2007, 11:42 PM   #3
limit_me
LQ Newbie
 
Registered: May 2007
Location: Kathmandu, Nepal
Distribution: Ubuntu 8.04
Posts: 10

Original Poster
Rep: Reputation: 0
Unhappy

hi,
thanks for your answer.

I have developed an application in linux that receives RTSP data from IP camera, and saves to Hard disk. This hard disk do hot have any filesystem. i have devised my own method of writing to Hard Disk. and all is going well.
This program is written in C and run on an embedded device which uses linux as a host.

Only one problem is left.the User authentication. I was thinking of integrating the users of the host linux to my program. so when users log in to my program, the user is logged to the linux machine. Is it possible?

Another option is just to create the user management in my program, devise my own protocol. but that is the last option for me.

Thanks for the suggestion.

PS: my program will run as daemon in linux host
PS: Sorry for my english.
 
Old 10-05-2007, 08:18 AM   #4
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
So, your camera driver/daemon on the linux host is supplying all of the services required to access the data? If so, there are a few similar existing systems to use a model: SSH & all of the related family of services (sftp, scp, etc.), X, the older unencrypted family of remote access applications (rsh, rlogin, ftp, etc), and HTTP. Each of these systems provide their own authentication methods. Since all of these are open source protocols, there is code available for inspection and/or porting to your own application.
As I understand it, the SSL/SSH protocol is designed as an API to make it possible to drop into new applications such as yours. Using a documented library & protocol such as that has the advantage of being compatible with existing tools, simplifying your development process. SSL also gives you a relatively secure system.
Hope this helps.

--- rod.
 
  


Reply

Tags
programming



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
How to setup FTP users only users on LInux Fedora Soujiro Linux - Newbie 8 09-13-2010 07:34 AM
C language in linux herbertgnanaraja Programming 3 08-11-2006 11:37 PM
Swapping desktop to Polish language for some users paragon17 Linux - General 4 05-14-2004 04:18 PM
Linux language gwhlevy Linux - General 10 07-12-2002 03:48 PM

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

All times are GMT -5. The time now is 10:34 PM.

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