- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Linux password help needed
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
05-04-2005 06:08 AM
05-04-2005 06:08 AM
1. If I plan to run chage to force the user to change the password at next login, do I have to set an initial password?
2. Is there some way to script the password command and pass it a generic value (to assign an initial password which I will then expire?)
3. Is there anyway to change a user password without being root? i.e. I have several non-human user accounts that I want a temp to set the passwords for and but don't want to give the temp root priviledges.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 07:03 AM
05-04-2005 07:03 AM
Re: Linux password help needed
2. man chpasswd (It read a file containing usernames and passwords and sets it)
3. Yes. Use sudo.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 07:52 AM
05-04-2005 07:52 AM
Re: Linux password help needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 09:58 AM
05-04-2005 09:58 AM
Re: Linux password help needed
NAME
passwd - update a userâs authentication tokens(s)
SYNOPSIS
passwd [-k] [-l] [-u [-f]] [-d] [-n mindays] [-x maxdays] [-w warn-
days] [-i inactivedays] [-S] [--stdin] [username]
Its not apparent from the man page what the functionality is but thats typical of a linux man page. hpux man pages are much better.
For your specific issue, look at -n mindays -x maxdays -w warndays and -i inactivedays as possible solutions.
SE
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
05-04-2005 05:58 PM
05-04-2005 05:58 PM
Re: Linux password help needed
depending on which version of linux you use the passwd program has different options. i checked on my SUSE server and it has -e option which does exactly what you are asking for.
-e The user will be forced to change the password at next login.
if your passwd does not have this functionality then try the combination of -n and -x
Hope this helps,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2005 08:11 PM
05-04-2005 08:11 PM
Re: Linux password help needed
2.yes there is a way to script passwd:
#!/bin/bash
for i in [ 1 2 3 4 5 ]
do
useradd user$i
echo user$i |passwd --stdin user$i
done
This script will add 5 users and give each it's username as password.
Password of user1 will be user1
3.read man of sudo command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2005 02:18 AM
05-05-2005 02:18 AM
Re: Linux password help needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2005 06:04 AM
05-26-2005 06:04 AM
Re: Linux password help needed
It's not helpful to claim "Its not apparent from the man page what the functionality is but thats typical of a linux man page." - especially as you are mistaken.
There is no "passwd -f" on Red Hat Linux.
using the command:
chage -d 0 username
should expire the password and should be scriptable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2005 05:07 PM
05-26-2005 05:07 PM
SolutionHow is the user going to know what the initial password if its not set.
The diaglog is the same for all users. You gotta log on before you can be forced to change your password. Therefore you need to set an intiial value.
2. Is there some way to script the password command and pass it a generic value (to assign an initial password which I will then expire?)
You can script the password set.
passwd username < file
in the file
newpassword
newpassword
root runs it so nobody needs to set the initial password.
alternate script text:
passwd username << EOF
newpassword
newpassword
EOF
3. Is there anyway to change a user password without being root? i.e. I have several non-human user accounts that I want a temp to set the passwords for and but don't want to give the temp root priviledges.
Use root to set the temp password. sudo can give non-root users certain priviledges. I don't totally understand request 3.
SEP
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
05-26-2005 05:15 PM
05-26-2005 05:15 PM
Re: Linux password help needed
And the 'sudo' answer is the good one.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2005 02:58 AM
05-27-2005 02:58 AM
Re: Linux password help needed
webmin.
webmin is a web based, gui interface that lets you create users and such.
It appears, based on the screen shot that you can create a limited administrative user with it that can handle functions such as password reset.
This thread and a customer call have forced me to look further into this concept. I am reading the documentation at this time. Its already installed on my web servers and I'm learning how to use it and will hopefully have more details soon.
SEP
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
05-27-2005 06:02 AM
05-27-2005 06:02 AM
Re: Linux password help needed
At this point I've got webmin/usermin working on Red Hat ES 4.
Right now, my configuration lets the user change any password, which is unacceptable in my security cirumstances.
I'm working on giving this user access only to users at his location. Then comes the step by step guide.
Because I need it for myself it should not be long.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com