LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 09-24-2004, 12:02 AM   #1
softnayr
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
How to store password file so it could not be deleted?


I want to create a file encyptor in Turbo C which uses password. I can already encypt files and store password for the encrypted file. But the problem is how to store a password file so others could not delete it.

Is there anyone who can help me in my problem?
 
Old 09-24-2004, 01:06 AM   #2
CroMagnon
Member
 
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900

Rep: Reputation: 33
(Turbo C? As in, for DOS?)

There's no way you can stop users from deleting files on their own PC. If you're using DOS, you could make the file read-only so it can't be accidentally deleted. Perhaps you could explain a little more fully what you want to do? Is the password file meant to be kept with the encrypted file? If it is, you could make it part of the encrypted file instead.
 
Old 09-24-2004, 09:26 AM   #3
shrey_j
Member
 
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39

Rep: Reputation: 16
If you r in Linux, put your files in your home login folder, only root or yourself(or anybody having your password) will be able to delete your file.

In case you are doing it from root, then place it in root, no other haS access to this.

But in case somebody has root access, you cannot stop that person from deleting that file.

Also add . before the file name (.filename), which makes it hidden..sometimes quite helpful

regards,
Shrey...
 
Old 09-25-2004, 07:44 AM   #4
softnayr
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Original Poster
Rep: Reputation: 0
Tnx...

Thank you very much CroMagnon for your reply. But when i encrypt password together with the file, it is possible that users can decrypt the file though they cannot get the actual file if they input password even if it is not the correct one. Anyway, can you teach me how to encrypt files together with the password?

Tnx...
 
Old 09-25-2004, 02:04 PM   #5
aluser
Member
 
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557

Rep: Reputation: 42
Is there something wrong with me, or is the point of encrypting a file that the user needs to supply the password himself in order to decrypt it?

lol, can you describe more precisely what you're trying to do? It might help in order for me or someone to suggest a better implementation.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
where to store mp3 in file hierarchy leopardb Linux - Newbie 6 07-05-2005 10:40 AM
How do i store the output of an rpm or source to file? dr_zayus69 Linux - Software 8 03-07-2005 10:03 AM
problem open lotus approach file store in fedora from winxp kts Linux - General 0 02-07-2005 07:39 PM
Lost Password file when user deleted clickit999 Linux - Security 2 09-19-2004 12:12 PM
use fat32 or ext2 as file store? bedwardj Linux - Hardware 2 08-27-2003 07:39 PM


All times are GMT -5. The time now is 02:52 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration