LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-10-2005, 02:09 AM   #1
ravikumarG
Member
 
Registered: Feb 2005
Location: India
Distribution: Fedora -2 ,Rhel3.0,CentOs 4.0-rc2
Posts: 60

Rep: Reputation: 15
password protecting linux binaries


Hi,

is there any program which can password protect linux binaries ?

-thanks for your time
 
Old 03-10-2005, 02:13 AM   #2
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 479

Rep: Reputation: 30
shouldn't you be able to password protect like a zip file? If not then I don't know. Maybe somebody who knows a bit more then me can help you out a bit more.
 
Old 03-10-2005, 05:32 AM   #3
titopoquito
Senior Member
 
Registered: Jul 2004
Location: Lower Rhine region, Germany
Distribution: Slackware64 14.2 and current, SlackwareARM current
Posts: 1,603

Rep: Reputation: 128Reputation: 128
I'm no expert at these things, but the way I understood is that you work with file permissions. So if you have special restrictions to use assign this file to root:newlycreatedgroup or root:existinggroup and make your users a member or not of this group to allow or keep them from executing it.
If you want to password protect your files to avoid accidental loss of data etc., then create a script that asks you again if you want to do this action, or use a command line switch by creating an alias for this command if the program has one (like rm -i to be asked again if you want to delete this file).

Cheers,

titopoquito

P.S.: Haven't worked with it yet, but can't you otherwise encrypt the file with gnupg in case you want to make it simply not readable at all?

Last edited by titopoquito; 03-10-2005 at 05:34 AM.
 
Old 03-10-2005, 06:23 AM   #4
ravikumarG
Member
 
Registered: Feb 2005
Location: India
Distribution: Fedora -2 ,Rhel3.0,CentOs 4.0-rc2
Posts: 60

Original Poster
Rep: Reputation: 15
HI,

Thanks , But not like that consider this windows product
http://salfeld.com/exe_password.htm

i want to know is any similar product for linux.
 
Old 03-10-2005, 07:48 AM   #5
ahh
Member
 
Registered: May 2004
Location: UK
Distribution: Gentoo
Posts: 293

Rep: Reputation: 31
That is not needed in Linux, you can only execute a file if you have permission to do so. So in essence you enter your password when you log in. If you don't have permission to execute the file you have to su or sudo to a user who does, which requires their password.

So, as you can see, it is built in to the Linux file system, with added flexibility. No need for afterthought addons.
 
Old 03-10-2005, 08:05 AM   #6
bitt_u
Member
 
Registered: Mar 2005
Posts: 39

Rep: Reputation: 15
if you open a binary its all junk, why do you want to encrypt the data?Don't have to give a password protection. No windows stuff o'er here.

Last edited by bitt_u; 03-10-2005 at 08:11 AM.
 
Old 03-10-2005, 10:39 AM   #7
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
for redhat/redhat derivatives (might be the same for other distros) you can follow these directions to make a binary runnable only by root; you will get prompted for the root password before you can run the binary.

http://www.linuxnovice.org/main_tips...=VIEW&t_id=127

You can make the binary run only under a different user as root also by changing the USER value in file you create under /etc/security/console.apps directory.

I've never done it before so I don't know if it will work, but if you're feeling brave enough, you can hack up the file and try to put in multiple users for the USER value...

ie... USER=root,my_user,some_other_user

But, i'm in agreement with the other suggestions about creating a group for that binary and placing users in that group if you want users to be able to run the binary.
 
Old 03-10-2005, 10:47 AM   #8
ravikumarG
Member
 
Registered: Feb 2005
Location: India
Distribution: Fedora -2 ,Rhel3.0,CentOs 4.0-rc2
Posts: 60

Original Poster
Rep: Reputation: 15
Hi
megaspaz,
Thanks for your reply. I know about linux security stuff (some what ) related to file permissions .

Here the complete story :

Two users are sharing one account ( same user name , password , i know this is akwad but some reason there ).

there is c++ compiled binary , both of users can access it , what i want only user who knows the password can execute that binary.
like windows program as i mentiond in previous reply.

so is it possible to password protect that perticular binary ?

-Thanks for your time
 
Old 03-10-2005, 10:56 AM   #9
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Quote:
Originally posted by ravikumarG
Hi
megaspaz,
Thanks for your reply. I know about linux security stuff (some what ) related to file permissions .

Here the complete story :

Two users are sharing one account ( same user name , password , i know this is akwad but some reason there ).

there is c++ compiled binary , both of users can access it , what i want only user who knows the password can execute that binary.
like windows program as i mentiond in previous reply.

so is it possible to password protect that perticular binary ?

-Thanks for your time
yes. look at that link i posted. when you create the file under the /etc/security/console.apps directory (the file is named after the binary you want to password protect), you add the user you want to access the binary under the USER key.

from the page:
Quote:
USER=root
PROGRAM=/path/to/application/binary/
SESSION=true
FALLBACK=true
you change the value of USER and the value of PROGRAM. just follow the instructions in the link i posted.

edit: you could create a dummy user account, give the user you want the login information to the dummy account, and then follow the instructions in the link i posted. but if to users have access to the same account, not much you can do there unless you create a seperate account and give one of the users that account.

Last edited by megaspaz; 03-10-2005 at 10:59 AM.
 
Old 03-10-2005, 11:03 AM   #10
ravikumarG
Member
 
Registered: Feb 2005
Location: India
Distribution: Fedora -2 ,Rhel3.0,CentOs 4.0-rc2
Posts: 60

Original Poster
Rep: Reputation: 15
Hi,

Yamii!! It worked , thanks for your quick reply.

i need to Redhat more
 
Old 03-15-2005, 05:02 AM   #11
john_the_ripper
LQ Newbie
 
Registered: Mar 2005
Posts: 3

Rep: Reputation: 0
hi bitt_u,
i think what ravikumarG wants is execution of binaries with a password protection. i.e. when someone tries to run that bin. it will first ask for password. now you tell me, where is the question of encryption?
 
Old 03-15-2005, 08:10 AM   #12
bitt_u
Member
 
Registered: Mar 2005
Posts: 39

Rep: Reputation: 15
hi, john_the_ripper
I appreciate your reply but if you follow this list closely you will see that I have answered a stuff on data encryption. I'll appreciate if we collectively work towrds The Problem!!!
 
  


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 protecting a directory? How? Thrifty Linux - Security 7 07-20-2004 09:25 PM
Protecting Root Password ukndoit Linux - Security 10 10-16-2003 10:32 AM
HTML password protecting darin3200 General 19 06-03-2003 04:13 AM
password protecting directories jayakrishnan Linux - General 2 02-10-2003 06:49 AM
password protecting a webpage jonfa Linux - General 5 03-22-2002 07:26 AM

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

All times are GMT -5. The time now is 02:42 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration