participate


General Solaris 10 Discussion - chpasswd
<<   Back to Forum  |   Give us Feedback
This topic has 6 replies on 1 page.
samscreen
Posts:6
Registered: 2/13/05
 
Hi All

does sun have an equivalent to the chpasswd in linux?
 
abrante
Posts:1,815
Registered: 8/19/05
Re: chpasswd   
Jan 16, 2007 3:26 AM (reply 1 of 6)  (In reply to original post )

 
Not as such (at least not that i know of). But its probably an quite easy script to write. As an alternative you can edit the /etc/passwd file manually or use usermod.

.7/M.
 
samscreen
Posts:6
Registered: 2/13/05
Re: chpasswd   
Jan 17, 2007 12:43 AM (reply 2 of 6)  (In reply to #1 )

 
yip but with chpasswd you can use excel to import all the users names then put in a password and copy down for the 1000 users and run it through the command and all the passwords are changed.

really great when you are installing a system and have setup the users now have to setup a specific password for the users.
 
abrante
Posts:1,815
Registered: 8/19/05
Re: chpasswd   
Jan 17, 2007 5:49 AM (reply 3 of 6)  (In reply to #2 )

 
Can't you just copy the passwd/shadow files from another system in that case? Or implement a namingservice.

.7/M.
 
alan.pae
Posts:1,355
Registered: 9/6/06
Re: chpasswd   
Jan 17, 2007 1:50 PM (reply 4 of 6)  (In reply to #2 )

 
what does chpasswd do said the non lnux person.

alan
 
abrante
Posts:1,815
Registered: 8/19/05
Re: chpasswd   
Jan 18, 2007 6:44 AM (reply 5 of 6)  (In reply to #4 )

 
Relevant question. A person i know who have a linux box sent me the following extract from the manpage.

NAME
chpasswd - update password file in batch

SYNOPSIS
chpasswd [-e]

DESCRIPTION
chpasswd reads a file of user name and password pairs from
standard input and uses this information to update a group
of existing users. Without the -e switch, the passwords
are expected to be cleartext. With the -e switch, the
passwords are expected to be in encrypted form. Each line
is of the format

user_name:password

The named user must exist. The supplied password will be
encrypted as necessary, and the password age updated, if
present.

This command is intended to be used in a large system
environment where many accounts are created at a single
time.


.7/M.
 
alan.pae
Posts:1,355
Registered: 9/6/06
Re: chpasswd   
Jan 18, 2007 1:13 PM (reply 6 of 6)  (In reply to #5 )

 
I've never heard of anything like this for Solaris. Even a naming service doesn't fit the bill as they still require you to enter the passwords, clear text, by hand, and then they are converted to some hash.

You could try compiling chpasswd on Solaris, or if it's a script file, you could just try running the script. A test box would be great for this endeavor.

If not, then it sounds like you could write some code that parses a file and feeds the information to the passwd command.

You could search around on O'Reilly's Code Zoo or Google has something to similar to that nowadays.

Looks like you're going to need a coder for this one.

alan
 
This topic has 6 replies on 1 page.
Back to Forum
 
Read the Developer Forums Code of Conduct

Click to email this message Email this Topic

Edit this Topic
  
 
 
Forums Statistics
    Users Online : 26
  • Guests : 122

About Sun forums
  • Sun Forums is a large collection of user generated discussions. It is here to help you ask questions, find answers, and participate in discussions.

    Check out our guide on Getting started with Sun Forums for a full walkthrough of how to best leverage the benefits of this community.

Powered by Jive Forums