Linux / UNIX Tech Support Forum
This is a discussion on How to authenticate users in shell scripts within the Shell scripting forums, part of the Development/Scripting category; Hi All, I need a script which should authenticate the 2 users present in the server and then proceed with ...
|
Register free or login to your existing account and remove all advertisements. |
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi All,
I need a script which should authenticate the 2 users present in the server and then proceed with the script. The scripts should as follow: It should ask the first user id, then his password, if its ok then it should ask for the second user id and its password, if its successful it should proceed with the script. I have written through this ssh, but not satisfied. I have tried with su also,but could not succeed. Any help is Appreciated. |
| Sponsored Links | ||
|
|
|
||||
|
You can't do that with shell script. You need to use real programming language like C or Perl to do that. Can you tell us more about what you are trying to do here? May be we can suggest something else...
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Whenever a admin wants to reboot a machine, he will be asked to enter the details of the change record and atlast two other admins should authenticate and then reboot will be performed. We want to log all these information..
|
|
||||
|
Standard Linux and UNIX systems record everything done by users including log of command run by users and system rebooting time. You need to setup sudo to delegate job and turn on system accounting for auditing purpose. No one writes script for this kind of work.
Try following tutorials for more info:
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Hey Udayakumar,
I am a beginner to linux but still i thought this bit of script will be useful to you echo "Enter your username:" read username if [ "$username" = "antony" ] then else fi |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SSH - Passing Unix login passwords through shell scripts | arulkumarr | Shell scripting | 4 | 08-27-2008 10:22 PM |
| Squid server to authenticate with Windows Active Directory | aasif.shaikh | Getting started tutorials | 2 | 05-31-2008 05:50 PM |
| shell scripts required for students | roni | Shell scripting | 6 | 07-20-2007 07:21 PM |
| running command a root in shell scripts | chiku | Shell scripting | 1 | 07-17-2006 07:39 PM |
| shell script for finding users not logged on for last 10 day | ganes | Shell scripting | 4 | 07-06-2005 12:01 PM |