09-10-2003
How are you entering the command? Vi has a -x option for encryption. Check that you don't have vi as an alias for vi -x (use the alias command.
From the vi man page:
-x Encryption option; when used, vi simulates the X com-
mand of ex and prompts the user for a key. This key is
used to encrypt and decrypt text using the algorithm
of the crypt command. The X command makes an educated
guess to determine whether text read in is encrypted
or not. The temporary buffer file is encrypted also,
using a transformed version of the key typed in for
the -x option. If an empty encryption key is entered
(that is, if the return key is pressed right after the
prompt), the file will not be encrypted. This is a
good way to decrypt a file erroneously encrypted with
a mistyped encryption key, such as a backspace or undo
key.
If the file is encrypted, then you will not see the file correctly if you just do a regular vi on it (the text will still be encrypted).
10 More Discussions You Might Find Interesting
1. Solaris
I only able to lock user ID with passwd -l username
It seems there is no option for me to unlock ID in solaris?
Is there any command as below?
passwd -u username
Appreciate someome can share with me the way to do it. (1 Reply)
Discussion started by: dwarf007
1 Replies
2. Shell Programming and Scripting
Hi All,
I am running a script , working very fine on cmd prompt. The problem is that when I open do crontab -e even after setting editor to vi by
set EDITOR=vi it does not open a vi editor , rather it do as below.....
/////////////////////////////////////////////////////
$ set... (6 Replies)
Discussion started by: aarora_98
6 Replies
3. UNIX for Dummies Questions & Answers
Hi Friends
We have two node trucluster Tru64 4.0F Alpha Servers,In one of Tru64 4.0F Unix Server I am unable to unlock users, when I issue usermod command I will get following error
/usr/sbin/usermod -x administrative_lock_applied=0 username
account manager has exited unexpectedly - please... (0 Replies)
Discussion started by: madanmb
0 Replies
4. HP-UX
Hi,
not able to unlock user eventhough executed /usr/lbin/modprpw -k username
Thanks in advance (2 Replies)
Discussion started by: bpsunadm
2 Replies
5. AIX
When I do HMC upgrade, I download HMC code from IBM web site and burn it to a DVD disk, when I get the first DVD out of HMC's dvd rom and input the second DVD, it shows error:
The requested device is already locked by the process: Install Corrective Service.
Would you like to try to request a... (2 Replies)
Discussion started by: rainbow_bean
2 Replies
6. Shell Programming and Scripting
Hi
we have one function which is used to append data the file in exclusive lock mode in aperl script.
This script is executed by multiple threads at the same time.
accessing the same file.this script runs throught the day.
sometimes the file2.txt size is getting reduced.
for eg from 10 M... (1 Reply)
Discussion started by: Shahul
1 Replies
7. Shell Programming and Scripting
Requirement:First i need to unlock the directory which i had a script for it.If i select app1 it should unlock the directory and after chnages in the script once need to lock the directory with lock command
The below highlighed variables in lock and unlock has to be changed according... (2 Replies)
Discussion started by: bhas85
2 Replies
8. Shell Programming and Scripting
I'm running cygwin bash on Windows 8.1. I would like to to write a OS neutral bash script that uses the commands like lock, block and unlock.
Do I need to write lock, block and unlock myself in C++?
I'm hoping someone has already written them.
My bash script would look something like this:... (2 Replies)
Discussion started by: siegfried
2 Replies
9. Solaris
Hello,
It is to my understanding that when configuring the Solaris operating system to meet compliance standards, you must configure the "LOCK_AFTER_RETRIES" value in the "/etc/security/policy.conf" file to "YES", and then configure the "RETRIES" parameter in the "/etc/default/login" file to the... (4 Replies)
Discussion started by: TrustSovietBear
4 Replies
10. UNIX for Beginners Questions & Answers
I use Debian default encryption disk encryption. Only /boot it's not encrypted. When I boot I need to type my password, and then I will be logged in. But now I can't login. It always says that I typed the wrong password, but I typed the correct password.
I tried to boot in live-CD and try unlock... (3 Replies)
Discussion started by: zognadal
3 Replies
LEARN ABOUT OPENSOLARIS
des
des(1) User Commands des(1)
NAME
des - encrypt or decrypt data using Data Encryption Standard
SYNOPSIS
des -e | -d [-bfs] [-k key] [input-file [output-file]]
DESCRIPTION
des encrypts and decrypts data using the NBS Data Encryption Standard algorithm. One of -e (for encrypt) or -d (for decrypt) must be spec-
ified.
The des command is provided to promote secure exchange of data in a standard fashion.
Two standard encryption modes are supported by the des program, Cipher Block Chaining (CBC -- the default) and Electronic Code Book (ECB --
specified with -b). CBC mode treats an entire file as a unit of encryption, that is, if insertions or deletions are made to the encrypted
file then decryption will not succeed. CBC mode also ensures that regularities in clear data do not appear in the encrypted data. ECB mode
treats each 8 bytes as units of encryptions, so if parts of the encrypted file are modified then other parts may still be decrypted. Iden-
tical values of clear text encrypt to identical values of cipher text.
The key used for the DES algorithm is obtained by prompting the user unless the `-k key' option is given. If the key is an argument to the
des command, it is potentially visible to users executing ps(1) or a derivative. To minimize this possibility, des takes care to destroy
the key argument immediately upon entry.
The des command attempts to use DES hardware for its job, but will use a software implementation of the DES algorithm if the hardware is
unavailable. Normally, a warning message is printed if the DES hardware is unavailable since the software is only about 1/50th as fast.
However, the -f option will suppress the warning. The -s option may be used to force use of software instead of hardware DES.
The des command reads from standard input unless input-file is specified and writes to standard output unless output-file is given.
The following sections give information required to implement compatible facilities in other environments.
Since the CBC and ECB modes of DES require units of 8 bytes to be encrypted, files being encrypted by the des command have 1 to 8 bytes
appended to them to cause them to be a multiple of 8 bytes. The last byte, when decrypted, gives the number of bytes (0 to 7) which are to
be saved of the last 8 bytes. The other bytes of those appended to the input are randomized before encryption. If, when decrypting, the
last byte is not in the range of 0 to 7 then either the encrypted file has been corrupted or an incorrect key was provided for decryption
and an error message is printed.
The DES algorithm requires an 8 byte key whose low order bits are assumed to be odd-parity bits. The ASCII key supplied by the user is
zero padded to 8 bytes and the high order bits are set to be odd-parity bits. The DES algorithm then ignores the low bit of each ASCII
character, but that bit's information has been preserved in the high bit due to the parity.
The CBC mode of operation always uses an initial value of all zeros for the initialization vector, so the first 8 bytes of a file are
encrypted the same whether in CBC or ECB mode.
OPTIONS
-b Select ECB (eight bytes at a time) encryption mode.
-d Decrypt data.
-e Encrypt data.
-f Suppress warning message when software implementation is used.
-s Select software implementation for the encryption algorithm.
-kkey Use the encryption key specified.
FILES
/dev/des?
SEE ALSO
ps(1)
BUGS
It would be better to use a real 56-bit key rather than an ASCII-based 56-bit pattern. Knowing that the key was derived from ASCII radi-
cally reduces the time necessary for a brute-force cryptographic attack.
SunOS 5.11 3 Mar 2008 des(1)