Sponsored Content
Full Discussion: Need help with security
Top Forums UNIX for Dummies Questions & Answers Need help with security Post 14414 by thehoghunter on Thursday 31st of January 2002 11:46:53 AM
Old 01-31-2002
You would have to create a base file - this can be done on the fly in your script before you start checking on everyone.

In your script - who -u |awk '{print $1,$3}' - set a variable to these values. grep to see if the first $1 (the userid) is already in the file. If it is, do nothing but if it isn't write the userid and IP to the file.

Once you get a user id that is in the file and your script finds it in there, then you can start to compare the IP address.

UserIP-File format;
userid IP

joeuser 172.16.1.2
jackuser 172.16.1.3
janeuser 172.16.1.4

To compare what is on the system versus what is in the file, use your who -u command again, pulling the userid and IP into two variables. Check for the userid in the file - if it is there, compare the IP addresses. If different, then email yourself to check it out

You could do many more things with this...but I hope you get the idea.
thehoghunter
 
PGP(1)							      General Commands Manual							    PGP(1)

NAME
pgpgpg - wrapper around Gnu Privacy Guard that takes Pretty Good Privacy command line options SYNOPSIS
pgpgpg [options] pgpfile pgpgpg -e [options] file user ... DESCRIPTION
PGPGPG is a wrapper that allows calls to GnuPG (Gnu Privacy Guard) using the command line options of (Pretty Good Privacy). PGP and GnuPG are encryption programms with high security encryption engines. However, PGP is available without a fee but is not realy free software. GnuPG on the other hand is realy free software and has additionally features but with a different command line syntax than PGP. The goal of pgpgpg is to plug in a command line syntax in front of GnuPG equal to PGP 2.6. OPTIONS
The following options are supported by pgpgpg notice that long options do not use the usual GNU syntax (--) but, instead are of the form +option[=value]. -e Encrypt a plaintext file. -d, -p Decrypt a plaintext file. -s Sign a plaintext file. pgpgpg -s file [-u userid] -sb Create a separate signature certificate (a .sig file) for a given file. pgpgpg -sb file [-u userid] -c Use convential cryptography when encrypting. -o Output to the file specified. Should only be used for encryption, decryption and signature operations (not for key management). -a, +armor ASCII armor the output file. -u, +myname Select the userid to use for some operations. -kg Generate a unique public/secret pair. -ka Add a public or secret key to your key ring. pgpgpg -ka keyfile [keyring] -kx Extract a copy from your public or secret keyring. pgpgpg -kx[a] userid keyfile [keyring] -kv View the contents of your keyring. pgpgpg -kv[v] [userid] [keyring] -kvc View a key fingerprint. pgpgpg -kvc [userid] [keyring] -kr Remove a key from your keyring. pgpgpg -kr userid [keyring] -kd If acting on your secret key, permanently revoke a key and issue a compromise certificate. If acting on a public key, disable or reenable a key. pgpgpg -kd userid -ke Edit trust parameters for a public key or edit the pass phrase or add a userid to a secret key. pgpgpg -ke userid [keyring] -kc View the contents and check the certifying signatures of your public key ring. pgpgpg -kc [userid] [keyring] -ks Sign and certify someone's public key. pgpgpg -ks userid [-u userid] [keyring] The following options are ignored or unsupported: ++armorlines, +autosign, +bakring, +interactive, +keepbinary, +language, +legal_kludge, +nomanual, +pager, +randseed, +tmp and +tzfix. BUGS
PGPGPG does not currently provide an online help (-h or -?) and will not show a summary of commands, as PGP does, when typing: pgp -k The following options are not documented (yet): +batchmode, +cert_depth, +charset, +encrypttoself, +force, +clearsig, +comment, +com- pletes_needed, +compress, +marginals_needed, +pubring, +secring, +textmode and +verbose. AUTHORS
PGP was originally written by Philip R. Zimmermann. PGPGPG was written by Michael Roth. This manpage was written by Javier Fernandez-Sanguino for the Debian distribution (but may be used by others) by glancing at PGP's manpage and the source code from PGPGPG (pgpopts.c) PGPGPG Version 0.13 PGP(1)
All times are GMT -4. The time now is 08:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy