encryption is possible??

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting encryption is possible??
# 1  
Old 07-10-2002
encryption is possible??

NEED expertise help for this topic!!!

Question 1: Is encryption possible for the shell scriping programing? shadow the scriping file, do think is impossible...

Question2: built a simple program with the simplicity function that allow user change settings by enter corret name and password combination, how to prevent the password not being seen by others just open up the scriping file?

Question 3: is possible to retrieval data from a encryped file? if can, how?

any comment are all welcome, Thanks in advance!!!

# 2  
Old 07-10-2002
You can use encryption in a script but what are you using to write this in? If you are looking to do something with the password and/or shadow file, using Perl may be the way to go (at least for the call to the password/shadow file).

Unsure what you mean by "shadow the scripting file".

Question 2: What are you using - is this a web interface? Or just a script that normal users can run to change something (what?).

To prevent password from being seen:
from a web page: set input type to password
<input type="password" name="newpass" size=15>
For a terminal: stty -echo turns off echo, stty echo turns it back on. Check the man page for stty.

Q3: Yes, if you encrypt a file you can still retrieve data but you have to unencrypt it in the case of pgp. If you are talking about retrieve what a password is - not exactly. You can find out if a unencrypted password matches with the following - but you don't really unencrypt the password - you compare by encrypting.

Perl script to check a password - supply userid and password

# 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
$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);
if (crypt($oldpass, $salt) ne $passwd1) {
die "Not correct password";
# 3  
Old 08-09-2002
Unsure what you mean by "shadow the scripting file".
Encrypt a shell scripting file, so nobody can see the context of file, but the scripting file still executable, anyway to do that?
# 4  
Old 08-09-2002
Shell Script Compiler

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Cybersecurity

File encryption tools with MAC address as an encryption key

Hi all, I'm looking for secure file encryption tools that use MAC address as encryption key. FYI, I'm using Red Hat Enterprise Linux OS. For example: when A wants to send file to B A will encrypt the file with B's computer MAC/IP address as an encryption key This file can only be decrypted... (2 Replies)
Discussion started by: sergionicosta
2 Replies

2. Programming

3DES encryption

Hello everyone, can any one help me to find out the 3des(triple data encryption standard) algorithm implementation in C.. Thanks in advance (4 Replies)
Discussion started by: andrew.paul
4 Replies

3. AIX

Encryption in AIX

Can I encrypt PDF files in AIX 5.3? (2 Replies)
Discussion started by: anthony123
2 Replies

4. Shell Programming and Scripting

Password encryption...

Hi, I have a Java app that looks for some parameters in a .properties file such as username and password. However I don't want to leave the password in a text file and I can't modify the app... Does anyone have some idea about how to encrypt/hide/etc the password so it's not freely accessible... (1 Reply)
Discussion started by: Tr0cken
1 Replies

5. Shell Programming and Scripting

Perl and encryption

Basically, I'm wondering if there's an easy way to encrypt the password to a username and store it in MySQL. But being able to authenticate to it. (3 Replies)
Discussion started by: adelsin
3 Replies

6. UNIX for Advanced & Expert Users

Encryption Programming

I use SCO OpenServer 5 and need to add encryption capability. Is there a standard SCO package, or should I go custom, or what? (2 Replies)
Discussion started by: coreysan
2 Replies

7. UNIX for Advanced & Expert Users

pgp encryption

Hi I have one script for doing the gpg encryption on linux. The encrytion is doing fine when i am running the script from command prompt on linux The same script when it is triggering from mainframe using sysopts option in NDM(connect direct) the encryption step in the shell script is... (0 Replies)
Discussion started by: Arvind Maurya
0 Replies

8. AIX

passwords encryption

I want to store a password of a user in a encrypted format and the use that encrypted password in my shell scripting. can any one of you let me know how to do it. Thanks in advance (0 Replies)
Discussion started by: kalpana.anuga
0 Replies

9. UNIX for Dummies Questions & Answers

File encryption/Key encryption ????

My dilemma, I need to send, deemed confidential, information via e-mail (SMTP). This information is sitting as a file on AIX. Typically I can send this data as a e-mail attachment via what we term a "mail filter" using telnet. I now would like to somehow encrypt the data and send it to a e-mail... (1 Reply)
Discussion started by: hugow
1 Replies
Login or Register to Ask a Question