Is there generic Encryption / Masking Tool available ?
I was using crypt command to mask and unmask my password in the script in Linux.
But, I don't find crypt on SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4v
Thus, my script fails.
Is there a generic / more common command tool / script across Linux and Unix (most / all flavors) that I can use across different OS whichout have to change the Masking / Unmasking code in my script when moving between different systems?
I've not had your problem on Solaris 9, 10, or 11.
Could something be wonky with the PATH variable? Solaris does have an oddity path-wise - the /usr/xpg4/bin - /usr/bin deal where really old versions of something like awk exist in /usr/bin and newer versions of commands in /usr/x???/bin
Try this
So, something is wonky somewhere, probably on your environment side - as a guess.
crypt has been on every UNIX and UNIX-like system I have seen.
The crypt() function is required by the POSIX Standard (and is there so passwords can be encrypted). But that is a one-way operation. You can use crypt() to encrypt your password and you can use crypt() to encode a user-entered password guess and then use strcmp() to see if the two encrypted strings match.
There is also the encrypt() function (which is in the current standards) and the crypt utility (which is not in the current standards), which are capable of encoding and decoding text. But, US government regulations prohibit exporting that code to many other countries. So while a Solaris system shipped by Oracle to a US customer might contain the crypt utility and the encrypt() function, a corresponding Solaris system sent to China, Iran, or Russia (and maybe any other country outside the US borders) would get a an encrypt() function in libc that always fails and returns with errno set to ENOTSUP when asked to decode encrypted text (and maybe also when asked to encode text). I no idea whether systems Oracle ships with the reduced capability encrypt() are shipped with a non-functioning crypt utility or if it is dropped from the distribution completely.
crypt() in unistd.h is supposed to be part of the C library standard and the command crypt does exist for Solaris:
Try this
So, something is wonky somewhere, probably on your environment side - as a guess.
crypt has been on every UNIX and UNIX-like system I have seen.
Sorry, I don't find crypt on Linux.
Thus, my question remains ...Is there a generic command for masking passwords that works on most Unix / Linux systems.
I tried the below but i don't find them on most systems.
Please suggest.
I hate to state the obvious but: care to extemporate on the fact that Linux is not Solaris and vice versa?
What's more, Linux is not POSIX, so there might be a crypt() function built into its system library, but there is no guarantee for that. Any POSIX-compliant UNIX, though, has to have this function, as Don Cragun and Jim McNamara have pointed out.
Is this not a flawed project in any case? If the code is written to en/decrypt, then anyone reading the code can decrypt, so your security is lost.
What external key do you have to validate the user? A one-way encryption and user entry would be better.
If you are looking to store a password for use connecting to another system for a process to be performed or data transferred, you would probably be better investigating SSH keys.
Can you tell us more about the purpose of the code?
I have a requirement of masking few specific fields in the UNIX file. The details are as following-
File is fixed length file with each record of 250 charater length.
2 fields needs to be masked – the positions are 21:30 and 110:120
The character by character making needs to be done which... (5 Replies)
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)
So I've been working on this for some time now and can't seem to find the solution that works for me. I'm working in C/Unix. Basically, I want to take a user input and output something different. For example, I want to take a password and output *'s. In another instance, I want to take inputed... (35 Replies)
Hi I am facing an issue with the below script which has the below line
each field being separated with a tab.
I need to mask the 8 and 7th field based on following conditions
1. 8th field is 16 in length and is numerics
i will mask the middle 6 digits except the first 6 and last 4.
input... (2 Replies)
What would you recommend for encryption on a SCO unix box, with local
application only? My box is not on the internet, and all I want to do is
take a text file of digits and encrypt them. Should I try to write my own
program, or is there a tool I can use or buy? (3 Replies)
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)
Is it possible for a internal LAN to mask a IP e.g. i have a server ip running the intranet ip being 192.168.0.8 and i want to make that like www.intranet.com is this possible on a internal network ? (1 Reply)