Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Multiple protected directories Post 22798 by RTM on Monday 10th of June 2002 10:58:56 PM
Old 06-10-2002
To check that password:
Code:
#!/u/bin/perl
#
#  Grab the user's old password from /etc/shadow and compare to sent
#       old password from web page - send back error if not the same
#
#       HOG 04/25/02 Another wonderful product from The Empire
# ====================================================================
# Set up variables ------------
$user = "$ARGV[0]";
$oldpass = "$ARGV[1]";
$datenow = "`date '+%h %d %T'`";
#
$userinfo = `/usr/bin/grep $user /etc/shadow`;
($user1, $passwd1, $passextra) = split(/:/, $userinfo, 3);
$salt = substr($passwd1,0,2);
#
# Put testing junk here (print variables)
#
    if (crypt($oldpass, $salt) ne $passwd1) {
        # =========== FAILED - write to messages file - return error =========
        system("/usr/bin/echo \"$datenow progserver chgpwd: ERROR changing $user
 password on check\" >> /var/adm/messages");
        die "";
    }

added code tags --oombera

Last edited by oombera; 02-17-2004 at 01:50 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

moving directories to new directories on multiple servers

Hi - I am new to unix scripts...I need to move several directories on multiple servers to new directories. (0 Replies)
Discussion started by: mackdaddy07
0 Replies

2. Shell Programming and Scripting

Using ls on multiple directories

Hi, I am using ls command as below to get the list of *.edi files from 2 different subdirectories as1 & as2: /ntekupal/test$ ls ./as1/*.edi ./as2/*.edi It is giving me list of edi files in these folders as below : ./as1/6df667.edi ./as2/823ssd3.edi Now my requirement is to just... (8 Replies)
Discussion started by: ntekupal
8 Replies

3. UNIX for Dummies Questions & Answers

Using ls on multiple directories

Hi, I am using ls command as below to get the list of *.edi files from 2 different subdirectories as1 & as2: /ntekupal/test$ ls ./as1/*.edi ./as2/*.edi It is giving me list of edi files in these folders as below : ./as1/6df667.edi ./as2/823ssd3.edi Now my requirement is to just get... (3 Replies)
Discussion started by: ntekupal
3 Replies

4. Shell Programming and Scripting

check if multiple directories exist else create missing directories

Hi , I 'm trying to check if multiple directories exist on a server, if not create the missing ones and print " creating missing directory. how to write this in a simple script, I have made my code complex if ; then taskStatus="Schema extract directory exists, checking if SQL,Count and... (7 Replies)
Discussion started by: ramky79
7 Replies

5. UNIX for Dummies Questions & Answers

Multiple search in multiple directories

Hi, I am facing the below problem I have a list of number to be searched(around 1000) files resideing in multiple directories as i dont know where it resides in. for example search string is like (abc)123456 please help. very urgent Thanks a lot Uma (3 Replies)
Discussion started by: umapearl
3 Replies

6. UNIX for Dummies Questions & Answers

Unzipping multiple password-protected files

I am trying to unzip ~150 files on a SUN server in Unix via a telnet program (PuTTy), so I am restricted (I believe) to single-line command functions. All of the files are password protected, and each one contains three files. Is there a way to automate the process? I have tried 7z, but that only... (0 Replies)
Discussion started by: Davman
0 Replies

7. Shell Programming and Scripting

FTP multiple files from multiple directories

I have multiple files that starts as TRADE_LOG spread across multiple folders in the given structure.. ./dir1/1/TRADE_LOG*.gz ./dir2/10/TRADE_LOG*.gz ./dir11/12/TRADE_LOG*.gz ./dir12/13/TRADE_LOG*.gz when I do ftp uisng mput from the "." dir I am getting the below given error mput... (1 Reply)
Discussion started by: prasperl
1 Replies

8. Shell Programming and Scripting

perform 3 awk commands to multiple files in multiple directories

Hi, I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them. Each of... (20 Replies)
Discussion started by: amarn
20 Replies

9. UNIX for Dummies Questions & Answers

Deleting multiple directories inside multiple directories

Hi, Very unfamiliar with unix/linux stuff. Our admin is on vacation so, need help very quickly. I have directories (eg 40001, 40002, etc) that each have one subdirectory (01). Each subdir 01 has multiple subdirs (001, 002, 003, etc). They are same in each dir. I need to keep the top and... (7 Replies)
Discussion started by: kkouraus1
7 Replies

10. Programming

RCP the multiple directories

Hi Friends, need to copy from server1 to server2 below name folder with modification date server1 ---------------- Created date Name 19Aug folder1 (contain sub directories also) 20Aug folder2 (contain sub directories also) 21Aug folder2 (contain sub... (0 Replies)
Discussion started by: rabindratech
0 Replies
SOLRGENERICRESPONSE(3)							 1						    SOLRGENERICRESPONSE(3)

The SolrGenericResponse class

INTRODUCTION
Represents a response from the solr server. CLASS SYNOPSIS
SolrGenericResponse final SolrGenericResponseextends SolrResponse Constants o const integer$SolrGenericResponse::PARSE_SOLR_OBJ0 o const integer$SolrGenericResponse::PARSE_SOLR_DOC1 Inherited properties o const integer$SolrResponse::PARSE_SOLR_OBJ0 o const integer$SolrResponse::PARSE_SOLR_DOC1 o protected integer$http_status o protected integer$parser_mode o protected bool$success o protected string$http_status_message o protected string$http_request_url o protected string$http_raw_request_headers o protected string$http_raw_request o protected string$http_raw_response_headers o protected string$http_raw_response o protected string$http_digested_response Methods o public SolrGenericResponse::__construct (void ) o public void SolrGenericResponse::__destruct (void ) Inherited methods o public string SolrResponse::getDigestedResponse (void ) o public int SolrResponse::getHttpStatus (void ) o public string SolrResponse::getHttpStatusMessage (void ) o public string SolrResponse::getRawRequest (void ) o public string SolrResponse::getRawRequestHeaders (void ) o public string SolrResponse::getRawResponse (void ) o public string SolrResponse::getRawResponseHeaders (void ) o public string SolrResponse::getRequestUrl (void ) o public SolrObject SolrResponse::getResponse (void ) o public bool SolrResponse::setParseMode ([int $parser_mode]) o public bool SolrResponse::success (void ) PREDEFINED CONSTANTS
SOLRGENERICRESPONSE CLASS CONSTANTS
o SolrGenericResponse::PARSE_SOLR_OBJ -Documents should be parsed as SolrObject instances o SolrGenericResponse::PARSE_SOLR_DOC -Documents should be parsed as SolrDocument instances. PHP Documentation Group SOLRGENERICRESPONSE(3)
All times are GMT -4. The time now is 10:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy