Some times i needed to lock applications (For an example Firefox).
When i execute Firefox application, It might open password prompt and ask password to run the application.
Is there any software available for that feature in Linux?
(I want this feature for both red hat based systems as well as Debian)
hi bro,
you can edit the .desktop file to run in root
- find .desktop file for your application ex: firefox.desktop
- open in any text editor (> sudo nano /usr/share/applications/firefox.desktop)
- find and change the line
Exec=APP_COMMAND
to
Exec=gksudo -k -u root firefox %u
- save and exit
- now firefox needs root permissions to execute via .desktop file
6)but you can run firefox via terminal without root password its work only in .desktop file
another method
1)find the shell script file for the application (ex:/usr/lib/firefox/firefox.sh)
2)find and edit this line
exec $MOZ_LIBDIR/$MOZ_APP_NAME “$@”
to
exec gksudo -k -u root $MOZ_LIBDIR/$MOZ_APP_NAME “$@”
3)now firefox needs root permission to execute in anyware including terminal
but i am not sure second method will work for all applications
Works fine but the password is login password. i want to assign different password for the application bro
Are you sure you want to allow Firefox (or any user application, for the same matter) to run as root?
No. I don’t want to run Firefox as root. Just locking application. when user open Firefox (Or any user application, It might ask password (Not an root or user password) to run.
This feature is i seen in applocker application in Windows.
@Buvanesh_Kumar,
Then I don’t think you want to go with the approach suggested by @Raja_Tirupur. Although it technically works, it exposes a serious security breach.
I know I am not really answering your original question, but just wanted to comment on the security implications of applications running as root.