Openssl trouble by autentification


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Openssl trouble by autentification
# 1  
Old 01-19-2015
Openssl trouble by autentification

Hi,


I got following problem I want to use encrypted password and login for my script for oracle DB.

Code:
  #This was created with  echo "login" | openssl enc -base64  and  echo "password" | openssl enc -base64
  login= bG9naW4K
  passwd= cGFzc3dvcmQK

Im using following syntax :

Code:
  login= bG9naW4K
  passwd= cGFzc3dvcmQK

Code:
  login_d=`echo $login| openssl enc –base64 -d`
  passwd_d=`echo $passwd | openssl enc –base64 -d`

when I perform following commnads :

Code:
  echo -n $ login_d 
  echo –n $passwd_d

it seems to be identical but when I launch
Code:
  con_string=“${login_d}/${passwd_d}@${mydb}“
  select =${/my_select.sql}
   
  sqlplus –s ${con_string} @${select}

it returns: invalid username/password; logon denied

any idea where might be a problem ? maybe there are some invisible chars or something or any idea how to fix it ?

The idea is to not have password and login in text form but encrypted with openssl.

Moderator's Comments:
Mod Comment edit by bakunin: with 33 posts and membership lasting 5 years you should know better than not to use CODE-tags.

Last edited by bakunin; 01-19-2015 at 12:40 PM..
# 2  
Old 01-19-2015
Code:
${login_d}/${passwd_d}@${mydb}

Somewhere along the line your code got pasted into MS Word or some other word processor which has changed your ordinary double quotes into nasty "smart" quotes which the shell takes to be literal characters.
# 3  
Old 01-20-2015
The quotes are ok maybe I made mistake when I copied it from unix to windows but I have with other scripts there is no problem

any idea ??
# 4  
Old 01-20-2015
Post your actual code, then.
# 5  
Old 01-20-2015
hm I just figure out that there might another problem

I just launched in the shell:
Code:
sqlplus login/password@db

and I got :
ERROR:
ORA-01017: invalid username/password; logon denied

but when I use the credentials in sql developer its working so the problem is somewhere else ...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Cybersecurity

OpenSSL

I just started playing around with Unix's OpenSSL utility. I can't seem to get the hang of it, and the man page isn't helping much. I wanted to experiment with file encryption, so I created a dummy text file with one line of text and tried to encrypt it using DES. I used the following command: ... (2 Replies)
Discussion started by: Ultrix
2 Replies

2. Red Hat

Openssl vulnerabilities

Hi there, The following openssl package are installed on the machine (openssl-1.0.0-27.el6_4.2.x86_64). It isn't the last version but I need to known if this content Vulnerabilities... How to check that on RedHat? Could you please tell me how to find this information?? Thankx (3 Replies)
Discussion started by: hiero_nymus
3 Replies

3. UNIX for Dummies Questions & Answers

Very big delay (about 300 sec) before autentification

Dear all, I got a problem and have no idea how to solve it. I was searching in the forum and google it and have found similar problem but provided solution doesn't help me. I have Solaris 11: Oracle Solaris 11 11/11 X86 Copyright (c) 1983, 2011, Oracle and/or its affiliates. ... (13 Replies)
Discussion started by: nypreH
13 Replies

4. AIX

openssl issue

Gurus, As per audit recommendation i have installed openssl.base 0.9.8.803 and upgraded openssl from 9.7l to 9.8 as prerequisits. But post these installation ssh fails with below error message. exec(): 0509-036 Cannot load program ssh because of the following errors: 0509-150 ... (3 Replies)
Discussion started by: newaix
3 Replies

5. Solaris

Openssl 0.9.8r

Hi Peeps, Having trouble compiling openssl 0.9.8r on Solaris 10 x86. The make test fails when running the shatests (segmentation faults). There is a PROBLEM file that references a file called values.c. Anyone know whereabouts in the source tree you put this file as the file doesn't tell you... (2 Replies)
Discussion started by: callmebob
2 Replies

6. UNIX for Advanced & Expert Users

Using openssl

All, I am new to openssl and I have not been able to figure out exactly how to use it. What I need to do is to create a shell script which FTPS's (SFTP is not allowed on my project) a file to a mainframe. The mainframe will not initiate a session with my server. Question. Are the packages... (7 Replies)
Discussion started by: MichaelInDC
7 Replies

7. Solaris

ERROR OpenSSL

ERROR OpenSSL version mismatch. Built against 908070, you have 9080bf^M 2009.11.20 15:23:25 ERROR Connection closed^M i am new in solaris,i not have great know in this operative system Help me how i can fixed this, in the machine has installed Solaris Machine hardware: ... (1 Reply)
Discussion started by: saurio
1 Replies

8. UNIX for Advanced & Expert Users

openssl help

I ungraded my openssl on sun solaris 8 from openssl 0.9.6c to openssl 0.9.6g the ungrade went fine but when I tried to ssh in to server, I received the following error message "ld.so.1: ./sshd: fatal: relocation error: file /usr/local/ssl/lib/libcrypto.so.0.9.6: symbol main: referenced symbol... (2 Replies)
Discussion started by: hassan2
2 Replies
Login or Register to Ask a Question