- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to protect the start of an application
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2006 01:19 PM
09-28-2006 01:19 PM
howto write a script to protect the start of an application using password for example thunderbird ?
kind regards
chris
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-28-2006 06:11 PM
09-28-2006 06:11 PM
Re: script to protect the start of an application
You can encrypt the password by "crypt" command so that no one can ready it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2006 12:43 AM
09-29-2006 12:43 AM
SolutionFirst generate an encrypt password better use a 8 char password because command makekey request 8 char + 2 char "salt". I'll use thunder1 + "salt" U5 to encrypted password:
echo "thunder1U5"|/usr/lbin/makekey
The output is "U5.8pOqbhJ3SQ". In your script, you just need to check if user provided password will match this one or not.
#! /usr/bin/ksh
stty -echo
echo "password: "
read pass
stty echo
pwch=`echo $pass"U5"|/usr/lbin/makekey`
if [ $pwch != "U5.8pOqbhJ3SQ" ] ; then
echo "wrong password, bye-bye"
else
/usr/local/bin/myapp
fi
exit
Regards,
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2006 01:52 AM
09-29-2006 01:52 AM
Re: script to protect the start of an application
One very easy way to accomplish what you want is to place the application under the control of sudo and add the line "timestamp_timeout=0" to /etc/sudoers. This will force a password query everytime.
If you like, you can setup a dedicated user for this application and assign a password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-29-2006 02:14 AM
09-29-2006 02:14 AM
Re: script to protect the start of an application
If you use sudo you can force a password entry, restrict access to specific users/groups, and every attempt to run sudo will be logged so you can track who did what. Slightly more setup, but way more manageable and secure.