Solved

Setting passwords automatically

Posted on 1997-07-15
4
169 Views
Last Modified: 2013-12-27
How do I set up passwords on Sun Solaris 2.5.1 automatically (e.g., using a shell script reading from a textfile with username/plain text password entries)
0
Comment
Question by:raggl
  • 2
  • 2
4 Comments
 
LVL 51

Accepted Solution

by:
ahoffmann earned 50 total points
ID: 2006535
Unix doesn't support converting plain text to passwords. Passwords are always crypted ;-)

But you can try to write a program using the  crypt(3)  function.

0
 
LVL 84

Expert Comment

by:ozo
ID: 2006536
Of course the text file could contain crypted entries...

Do you have a pwconv(1M) to create /etc/shadow from /etc/passwd?
I hope you're very carefull about doing the apropriate locking
to avoid accidentally breaking your user password files...

 

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 2006537
pwconv?
ozo, this just converts your /etc/passwd to /etc/shadow.
Or do you have a version with additional functionality?
0
 
LVL 84

Expert Comment

by:ozo
ID: 2006538
No, but converting /etc/passwd to /etc/shadow is a function which
"sets up passwords from a textfile"...

And it does so while maintaining the appropriate locks,
and while taking care not to open security holes or cause other problems.  

Considering that, I think I'd be hard pressed to come up with a
more suitable function.

 
 
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

840 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