Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 09-24-2004, 12:02 AM   #1
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
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
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

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

Original Poster
Rep: Reputation: 0

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?

Old 09-25-2004, 02:04 PM   #5
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.


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 > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:07 AM.

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