![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| I need it to prompt me for a root password, so I don't have to log as root | lunchtime | UNIX for Dummies Questions & Answers | 2 | 06-25-2007 12:21 PM |
| how to access root priveliges if root password is lost | wojtyla | Linux | 1 | 02-18-2005 03:24 AM |
| Lost root password / Can't login as root | Perderabo | Answers to Frequently Asked Questions | 0 | 06-22-2004 04:40 PM |
| No root password | cyno | UNIX for Dummies Questions & Answers | 6 | 08-14-2002 09:57 PM |
| root password | silver40 | Shell Programming and Scripting | 9 | 03-21-2002 01:38 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#8
|
||||
|
||||
|
steps to check (root) passwd in a script:
1/ grab/store the (root) passwd crypt string in a var e.g. CRYPT. 2/ get user to enter password: Code:
stty -echo trap "stty echo ; echo 'Interrupted' ; exit 1" 1 2 3 15 /usr/bin/echo "Enter password: " read password stty echo Code:
/usr/bin/perl -e "print 'match' if crypt('${password}', '$CRYPT') eq '$CRYPT';"
|
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Thanks for the reply, but i cant make any sense of it, and how to put it in the script,
sorry for being a pain, but idont know alot about bash, this is way over my head. |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|