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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
09-23-2004, 11:02 PM
|
#1
|
LQ Newbie
Registered: Sep 2004
Posts: 3
Rep:
|
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?
|
|
|
09-24-2004, 12:06 AM
|
#2
|
Member
Registered: Sep 2004
Location: New Zealand
Distribution: Debian
Posts: 900
Rep:
|
(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.
|
|
|
09-24-2004, 08:26 AM
|
#3
|
Member
Registered: Jul 2004
Location: Delhi
Distribution: FC3, RH 9.0
Posts: 39
Rep:
|
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...
|
|
|
09-25-2004, 06:44 AM
|
#4
|
LQ Newbie
Registered: Sep 2004
Posts: 3
Original Poster
Rep:
|
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...
|
|
|
09-25-2004, 01:04 PM
|
#5
|
Member
Registered: Mar 2004
Location: Massachusetts
Distribution: Debian
Posts: 557
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 09:41 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|