LinuxQuestions.org
Review your favorite Linux distribution.
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 04-23-2013, 10:56 AM   #1
krool89
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Rep: Reputation: Disabled
lock file with password


Is it possible to password protect a file that I want to ?
By this I mean that when anybody is going to view the file (whatever be the way he choose) it will ask for a password and if valid password is entered it will allow.
If any body found any hints or any suitable link just help me.
 
Old 04-23-2013, 11:05 AM   #2
amani
Senior Member
 
Registered: Jul 2006
Location: Kolkata, India
Distribution: Debian 64-bit GNU/Linux, Kubuntu64, Fedora QA, Slackware,
Posts: 2,766

Rep: Reputation: Disabled
How is it different from password protecting a file?
 
Old 04-23-2013, 11:09 AM   #3
krool89
LQ Newbie
 
Registered: Apr 2013
Posts: 6

Original Poster
Rep: Reputation: Disabled
sorry my bad english... password protecting a file that's what i mean
 
Old 04-23-2013, 11:10 AM   #4
jostber
Member
 
Registered: Jul 2001
Location: Skien, Norway
Distribution: Slackware Current 64-bit
Posts: 543

Rep: Reputation: 178Reputation: 178
http://www.lifelinux.com/linux-password-protect-files/
 
Old 04-24-2013, 01:07 AM   #5
redfox2807
Member
 
Registered: Jul 2012
Distribution: Debian testing/stable, Gentoo, CentOS 7, Sailfish OS, Android
Posts: 167

Rep: Reputation: 31
You have to encrypt the file in order to do that. Other option is to distinct users and apply privilleges to the file so that only the desired users can read the file. Anyway you have to enter your password in order to login.
 
Old 04-24-2013, 07:56 AM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934Reputation: 3934
Another option, perhaps more useful in a corporate environment, is to put the data on a shared drive which is only accessible to people who have logged-in with (according to LDAP / OpenDirectory) the proper credentials. The "PAM" facility in Linux can provide the necessary interfaces.
 
  


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
Password File Lock mattekure Linux - Newbie 2 06-13-2011 10:45 AM
can not lock password database file sixty_nine Linux - Enterprise 1 03-17-2008 05:11 PM
useradd: unable to lock password file shivadk Linux - Networking 1 12-13-2005 02:20 AM
userdel: unable to lock password file asc3ndant Linux - General 1 06-20-2003 01:07 PM
unable to lock password file beefyd Linux - Security 3 09-08-2002 09:33 AM

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

All times are GMT -5. The time now is 06:00 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