nixCraft Linux Forum

nixCraft

Linux 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

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-08-2008, 02:46 PM
Member
User
 
Join Date: Oct 2007
My distro: Linux RHEL 5
Posts: 33
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
Sponsored Links
  #2 (permalink)  
Old 06-13-2008, 11:06 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Any distro with shell
Posts: 966
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 | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


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 On

Similar Threads

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


All times are GMT +5.5. The time now is 06:52 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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