Solved

Setting passwords automatically

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

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…
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 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 get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

914 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

15 Experts available now in Live!

Get 1:1 Help Now