- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Change UNIX password by batch via a shell script
Operating System - HP-UX
1820475
Members
3314
Online
109624
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2007 07:37 PM
тАО01-27-2007 07:37 PM
Change UNIX password by batch via a shell script
We are going to launch a new application server to replace the old one (a database application)
We held some basic trainings more than a month ago to teach all the users how to change the UNIX and/or application's password. Some did change his/her UNIX password during the training but most of them have forgotten what's the new password that they have changed to
We have 400+ user acocunts & I want to reset all the UNIX passwords then send out an email to tell every one how to logon the first day when the new application goes production
eg. The Login ID is "test", the password is "test123". (passwd = adding 123 to the login ID). Then issue a "passwd -f $username" command to force everyone changing his/her password at the first logon
How can I do this password change by batch via a shell script?
Appreciate anyone who can reder me help on this
Rita
We held some basic trainings more than a month ago to teach all the users how to change the UNIX and/or application's password. Some did change his/her UNIX password during the training but most of them have forgotten what's the new password that they have changed to
We have 400+ user acocunts & I want to reset all the UNIX passwords then send out an email to tell every one how to logon the first day when the new application goes production
eg. The Login ID is "test", the password is "test123". (passwd = adding 123 to the login ID). Then issue a "passwd -f $username" command to force everyone changing his/her password at the first logon
How can I do this password change by batch via a shell script?
Appreciate anyone who can reder me help on this
Rita
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2007 08:29 PM
тАО01-27-2007 08:29 PM
Re: Change UNIX password by batch via a shell script
Hi Rita,
There was a similar question recently, check out these threads:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1087562
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1087561
Do these help you out ?
Cheers
Wout
There was a similar question recently, check out these threads:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1087562
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1087561
Do these help you out ?
Cheers
Wout
an engineer's aim in a discussion is not to persuade, but to clarify.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-27-2007 08:47 PM
тАО01-27-2007 08:47 PM
Re: Change UNIX password by batch via a shell script
Shalom Rita,
Essentially you need a user list.
cat /etc/passwd | awk '{ print $1 }' > list
# edit the list
while read -r uname
do
# passwd reset code goes here.
# call SEP's handy email with attachment script
done
# email attachment script:
http://www.hpux.ws/mailfile2
This script is a little over-engineered and you might just want to harvest the email portion of it instead of using the whole thing.
SEP
Essentially you need a user list.
cat /etc/passwd | awk '{ print $1 }' > list
# edit the list
while read -r uname
do
# passwd reset code goes here.
# call SEP's handy email with attachment script
done
# email attachment script:
http://www.hpux.ws/mailfile2
This script is a little over-engineered and you might just want to harvest the email portion of it instead of using the whole thing.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-31-2007 12:37 PM
тАО01-31-2007 12:37 PM
Re: Change UNIX password by batch via a shell script
Able to come up with a script finally that works, thanks
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP