Solved

Setting passwords automatically

Posted on 1997-07-15
4
172 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying 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

Title # Comments Views Activity
Unix, date minus 1, 2 or 3 days (last working day) 11 87
Shell script errors 10 143
UNiX Script filesystem space usage 19 79
Expiration and Locking of Unix/Solaris OS Accounts 7 65
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
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.

756 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