LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-01-2009, 04:26 AM   #1
sherimm
LQ Newbie
 
Registered: Nov 2007
Posts: 27

Rep: Reputation: 15
make a file password protected


Hi,

I have a created a file and i want to make that file as password protected in linux.

Is there any option or command available in unix where we can make a file password protected.

Please suggest

thanks in advance

Sheri.M
 
Old 04-01-2009, 04:36 AM   #2
Vit77
Member
 
Registered: Jun 2008
Location: Toronto, Canada
Distribution: SuSE, RHEL, Mageia
Posts: 132

Rep: Reputation: 17
Hi Sheri.M,

You may use GPG cryptography.

Encrypt:
Code:
gpg --symmetric --output EncryptedFile SourceFile
Decrypt:
Code:
gpg --output DecryptedFile --decrypt EncryptedFile
Does this help you?
 
Old 04-01-2009, 04:47 AM   #3
vlademir
Member
 
Registered: Jan 2009
Location: The Netherlands
Distribution: Centos,Ubuntu,Mandriva,Suse11.1
Posts: 86

Rep: Reputation: 17
Smile

Quote:
Originally Posted by sherimm View Post
Hi,

I have a created a file and i want to make that file as password protected in linux.

Is there any option or command available in unix where we can make a file password protected.

Please suggest

thanks in advance

Sheri.M
Linux supports file user-level security, so you can do this using the file system security.

Each file has a user and group assigned to it. Set up a group of users (in /etc/group) with all the users you want to be able to access the file listed, and use chgrp to change the file's group ownership to that group, then you just remove read, write and execute flags from the file for everyone with:

chmod o-rwx <filename>

Then if you want others to be able to access it on a case-by-case basis, then give them sudo privileges to run 'less', by editing /etc/sudoers. They can then read the file, if they must, by:

sudo less <filename>

They need to enter their password to access the file, and you get a message in the log that they've done it.
 
Old 04-01-2009, 05:09 AM   #4
sherimm
LQ Newbie
 
Registered: Nov 2007
Posts: 27

Original Poster
Rep: Reputation: 15
I really appreciate for quick response

Could you please help me like how can i protect the file with password in AIX box

thanks
Sheri.M
 
  


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
Password protected network... spaceballs Linux - Wireless Networking 3 01-11-2008 06:36 PM
Password Protected Folder's vezril Linux - Security 2 06-06-2005 11:26 PM
how to open password protected file (by MSWord) in Linux chillangella Linux - Newbie 2 08-04-2004 03:02 AM
unlocking (Win)password-protected file on CD svar Linux - General 5 10-13-2003 02:16 PM
how to recover MS-WORD and MS-EXCEL password protected file in Linux !!! hitesh_linux Linux - Software 1 07-15-2003 03:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:21 AM.

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