10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to manually interactively feed in my password for each server one after the other. Below is the script I am using:
#!/bin/bash
input="serverlist.txt"
while IFS= read -r var <&3
do
echo $var
ssh user1@$var
done 3< "$input"
I get password prompt for the first server. If I dont have... (1 Reply)
Discussion started by: mohtashims
1 Replies
2. Shell Programming and Scripting
Hello,
I just started with shell and i am doin simple script to check if certain user is logged in. Script takes 3 args. name sleep time and quit value
if there is q for quit then date and user name is printed to file, not to screen.
so far i have got this...
login()
{
while :... (3 Replies)
Discussion started by: shelllo
3 Replies
3. Shell Programming and Scripting
How can I add a check right after the FTP to see if the login id failed or not and echo an error description indicating login failed?
Here is my script:
ftp $HOST1 <<END_SCRIPT>>$TARGETLOGS/$LOGFILE
#ftp $HOST1 <<END_SCRIPT>
cd idx
prompt
mget $PICKUPFILE*.txt
!cp $PICKUPFILE*... (17 Replies)
Discussion started by: mrn6430
17 Replies
4. Programming
I made this named "confirm.sh":#/bin/sh
#username and password are already given by the login form
if ; then
realpass=`cat /home/alex/Desktop/Myfirstsite/allpasses/$username`
if ; then
#continue with index.html
else
echo "Bad password"
fi
else
echo "Unknown username"
fi because I wanted... (4 Replies)
Discussion started by: hakermania
4 Replies
5. UNIX for Dummies Questions & Answers
As a root user i switch to a different user say "oratest". I would like to know the details like at what time did the switch ( su - oratest ) happen.
Are there any logs to check this
Thanks. (4 Replies)
Discussion started by: jjoy
4 Replies
6. Solaris
Hi All,
In Solaris 10, how can I check back who is login to the systems by telnet, ssh and ftp in success or failed.
I already check on /var/adm/messages but no details for all this.
Hope your can help.
Thanks. (1 Reply)
Discussion started by: mailbox80
1 Replies
7. Shell Programming and Scripting
I need a script to figure out if a user's last login was 90 days or older. OS=AIX 5.3, shell=Korn
Here's what I have so far:
====
#!/usr/bin/ksh
NOW=`lsuser -a time_last_login root | awk -F= '{ print $2 }'`
(( LAST_LOGIN_TIME = 0 ))
(( DIFF = $NOW - $LAST_LOGIN_TIME ))
lsuser -a... (3 Replies)
Discussion started by: pdtak
3 Replies
8. UNIX for Advanced & Expert Users
Hi everybody,
I need to check in C program wether a given login is known on the system. Is there any system function that could do this ?
So far, all I could find is getpwnam(), which answers my problem by parsing the local password database. But won't work if a user is authenticated by... (10 Replies)
Discussion started by: xavier054
10 Replies
9. Solaris
Hi,
I'm new to solaris/ Unix and would like to know how to check in the system what
was the last login user were doing. Is there any way to check this? Thanks in advanced. (1 Reply)
Discussion started by: raziayub
1 Replies
10. UNIX for Advanced & Expert Users
I have a problem with a submirror of the root filesystem,
in the procedure in order to unmirror the FS say:
metadetach -f d0 d20
metaroot c0t0d0s0
but, in my system the metaroot cause a segmentation fault coredump. I knew that the command modify the /etc/system and
the /etc/vfstab.
I try... (3 Replies)
Discussion started by: hugo_perez
3 Replies