Solved

Setting passwords automatically

Posted on 1997-07-15
4
179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

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 …
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

622 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