![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SSH Password-less login fails on password expiry. | Renjesh | SUN Solaris | 2 | 04-24-2009 12:53 AM |
| Solaris 8 - Asks for current root password when trying to change root password. | tferrazz | SUN Solaris | 8 | 04-07-2009 02:28 PM |
| how to change root password using shell script with standard password | kurva | Shell Programming and Scripting | 2 | 02-25-2009 02:35 AM |
| password verification verify password of a user for only first 8 characters | amitpansuria | UNIX for Advanced & Expert Users | 12 | 10-23-2008 10:03 AM |
| Change password by pushing encrypted password to systems | benq70 | UNIX for Dummies Questions & Answers | 1 | 09-02-2005 09:08 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
People who post homework and repeatedly break the homework posting rules will be banned. Cheaters are not welcome here.
If you post homework, and do not complete the homework template completely and accurately, you will be banned. You should post your problem on Homework & Coursework Questions - The UNIX and Linux Forums but before that you should read: Thank You. The UNIX and Linux Forums Reply With Quote Tip below ![]() Code:
pass=Password;echo -n "Type password:";read pass2;if [ ${pass}. != ${pass2}. ];then echo "Wrong $pass, bye";else echo $pass OK ;fi
|
|
||||
|
The safest way to do what you want is to create one special user account - in this example let's call it trial.
1. add the user account 2. logon as trail 3. put the script(s) and data files all in the trial home directory. 4. chmod 700 all of the file(s), including the trial home directory itself. You now have an application that can be run only by the trial user. (or root) Your users can get to the tiral application one of two ways 1. login as trial 2. su trial -> requires the password for trial account. |
|
||||
|
It is not that simple. Do you know about PAM or keberos. for example?
Authentication on your system can be complex. If you are creating a 'secure' app, then you need to follow system rules. If you are trying to keep your little brother off the computer then write some that uses the getpass() call. man getpass has an example. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|