Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
04-30-2006, 05:45 AM
|
#1
|
Member
Registered: Nov 2005
Distribution: slackware64, debian
Posts: 34
Rep:
|
plaintext to shadow
Is it somehow possible to get shadow output from plaintext in some other file, not in /etc/shadow.
I need to generate every week another password for one user. That should be handle by bash script.
I will input random plaintext an then as output I should become shadow format like:
$1$JF11EXz9$p.O93fu4netf3JTfJii80/
I googled a lot, but nothing found.
Thanks
Travis
|
|
|
04-30-2006, 07:02 AM
|
#2
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
Use the passwd command to change the password, in the script which generates the new password. Then you can have the same script record the plaintext version somewhere, so you can give the new password to the user.
|
|
|
04-30-2006, 08:13 AM
|
#3
|
Member
Registered: Nov 2005
Distribution: slackware64, debian
Posts: 34
Original Poster
Rep:
|
Hm... that is not what I need, becouse that script should read the real shadow file, and that I wouldn't like.
I need passwd to output shadow in some other file that is not /etc/shadow.
|
|
|
04-30-2006, 09:18 AM
|
#4
|
Member
Registered: Nov 2005
Distribution: slackware64, debian
Posts: 34
Original Poster
Rep:
|
As they say the best way is find it yourself.
This is the magic command.
Code:
openssl passwd -1 plaintext
and the output will be shadow
thanks anyway
|
|
|
All times are GMT -5. The time now is 11:59 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|