nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Solaris Change User Password Using a Shell Script

This is a discussion on Solaris Change User Password Using a Shell Script within the Solaris/OpenSolaris forums, part of the UNIX operating systems category; Hi all, I need to change the password of any user in one go . For example in Linux we ...


Go Back   nixCraft Linux Forum > UNIX operating systems > Solaris/OpenSolaris

Linux answers from nixCraft.


Solaris/OpenSolaris Discuss all about the SUN Solairs/OpenSolaris. You are free to talk about any issues related to Solaris administration, networking, services and other stuff, share information or ask doubts.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-06-2008, 02:46 PM
Member
User
 
Join Date: Oct 2007
OS: Linux RHEL 5
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
vikas027 is on a distinguished road
Unhappy Solaris Change User Password Using a Shell Script

Hi all,

I need to change the password of any user in one go.

For example in Linux we have two options :-

Code:
(echo "username:password") | chpasswd
or
echo $PASS | passwd $USER --stdin
This changes the password without prompting. Actually, I need to make a script which adds a user and then sets a password to it.

I have made it for Linux but now I require it to run on other Unix boxes also. I dont have option to install any other utility like expect.

Pls can someone give Solaris equivalent of the command.

Thanks in adv.

VIKAS
Reply With Quote
  #2 (permalink)  
Old 13-06-2008, 11:06 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

User perl script provided in old threads.

Change root password using perl script?
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Change root password using perl script? Raj1 Solaris/OpenSolaris 8 13-06-2008 11:01 PM
let users change password using perl script? james bond Getting started tutorials 9 24-05-2007 10:32 PM
How to change the login shell for Linux user chimu Getting started tutorials 0 26-01-2007 07:20 PM
Shell script to change folder directory owner after restore marinm Shell scripting 5 23-01-2007 12:53 PM
HP UX user lock password, change password, password aging rockdalinux HP-UX 0 20-12-2006 02:36 PM


All times are GMT +5.5. The time now is 08:42 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38