Solved

Give a real usage example of using crypt

Posted on 2004-08-24
7
253 Views
Last Modified: 2013-12-27
Can someone give an actual example of using the Solaris crypt utility on a file?
0
Comment
Question by:jbusad97
7 Comments
 
LVL 20

Accepted Solution

by:
tfewster earned 500 total points
Comment Utility
I'm not sure what you mean by a "real example";  Are you trying to figure out tthe man page?

crypt mykey   < clear.file    > encrypted.file
or
crypt   < clear.file    > encrypted.file         (and enter the key when prompted)
0
 
LVL 3

Expert Comment

by:dtkerns
Comment Utility
also note, if you're a vi user you can use the following to edit the encrypted file:

vi -x encrypted.file

it prompts for the key just before clearing the screen and showing the contents
and of course, if the key you entered is wrong, you see junk ;)
0
 

Author Comment

by:jbusad97
Comment Utility
For instance, if I have a file called foo.:

user1>$ ls -la
total 6
drwxr-xr-x   2 user1 staff      512 Aug 25 11:35 .
drwxr-xr-x  11 user1 staff      512 Aug 25 11:35 ..
-rw-r--r--   1 user1 staff      141 Aug 25 11:35 foo

show the steps that would be taken to encrypt this file.  Or better yet, create the file on your system, perform the steps for encryption, then cut and past your steps as your answer.  This is what was meant as a "real example".

Thanks.
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 20

Expert Comment

by:tfewster
Comment Utility
crypt mykey   < foo  > foo.encrypted; mv foo.encrypted foo
0
 
LVL 18

Expert Comment

by:liddler
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Answered by tfewster {11885539}

Please leave any comments here within the next four days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

liddler
EE Cleanup Volunteer
0
 

Author Comment

by:jbusad97
Comment Utility
CRYPT AN ASCII FILE

An ascii file can be easily encrypted and
decrypted.

To encrypt simply pipe the STDOUT of
the file to "crypt" and redirect it to
a new file name. Enter a passowrd when
prompted with "Enter key".

$ cat foo | crypt > foo.e
Enter key:

To unencrypt simply pipe the STDOUT of
the encrypted file to "crpyt" and
redirect it to a new file name. Enter
a passowrd when prompted with
"Enter key".

$ cat foo.e | crypt > foo.new
Enter key:

or use vi -x to view the file
$ vi -x foo.e
Enter key:

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Best software for Unix commands in Windows cmd.exe? 18 95
Help stop mail server from sending spam. 27 116
reinstall 1 55
Sed question 2 44
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now