04-22-2002
Script to change UNIX password
My shop has just ordained that all UNIX passwords expire after 45 days. We do NOT have a "single logon" facility, so I will need to logon to each of the servers (15+) I interact with and change my password by hand. I thought I could invoke passwd inside a ksh script as a Here document and effectively change my password, stage this script on all the servers under my id, and then invoke via REXEC from one server.
Unfortunately, when I run passwd as a Here doc, it doesn't take my old/new password from stdin.
Here's what I'm doing inside pass.sh:
#!/usr/bin/ksh
passwd <<EOF
oldpassword
newpassword
newpassword
EOF
Does anyone have any thoughts on how I can "synchronize" all my passwords? (I don't have root privs - I'm a developer, not an administrator).
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have more than 50 server unix's password need to change, usually I assign one password for all hosts, for easy remember, but I need to change password every two months..it's very tried to change password every 2 months, is there any unix script that can change password easily?
ie ' script... (4 Replies)
Discussion started by: zp523444
4 Replies
2. Shell Programming and Scripting
hi,
Somebody have or known where i can find a perl small perl program to change the password.
The point: First it verify is the user exist, checking the old typed password and replace it with new. The passwords must be encoded.
Thanks, very much! (0 Replies)
Discussion started by: kad
0 Replies
3. Shell Programming and Scripting
Hi Friends.
I am new to scripting now i want to change the root password using the script with standard password.
which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies
4. UNIX for Dummies Questions & Answers
Hi guys,
I got these 3 servers: a, b and c which I ssh from a to b/c.
a:$ ssh userid@b
Password:
a:$ ssh userid@c
userid@c's password:
Notice that the password prompt is different (highlighted in bold) on both servers even though their SUN Solaris version the same, OpenSSH version... (0 Replies)
Discussion started by: DrivesMeCrazy
0 Replies
5. Shell Programming and Scripting
Hello Gurus
I have little challenge which I do not know how to address it. I have unix account on many servers (let's say over 25). These accounts expire every 60 days. Is there scripts that I can run from my "local computer" and pass a new password to it where it would change it for me on all... (7 Replies)
Discussion started by: nimo
7 Replies
6. HP-UX
Hi,
we have around 50 users and every month we need to change the password manually once its expire.
do we have any script to change the password automatically.
OS -HP-UX
Thanks in advance.. (6 Replies)
Discussion started by: periyasamycse
6 Replies
7. Shell Programming and Scripting
Hi Friends,
Every morning i need to change the password, please advise how it can be automated. I am having pre planned password list for 4 months which can be used as input file for new passwords.
Thanks (28 Replies)
Discussion started by: rajjev_saini123
28 Replies
8. Shell Programming and Scripting
Hey Gurus,
I have this requirement to change the password for other servers remotely from one server. So, I installed public keys on all servers and wrote the following script to do the job. Something appears to be wrong with my loop, as it only changes one server and ignores the rest. I'm... (24 Replies)
Discussion started by: Hiroshi
24 Replies
9. Shell Programming and Scripting
Hi Folks,
I am trying to change the password for the user "sysservice"
Where my requirement is login to each server and exit from that and ssh to the next server.. I have enabled the password less auth for the user sysservice.
for i in `cat /home/sysservice/servers.txt`
do
ssh... (1 Reply)
Discussion started by: gsiva
1 Replies
10. Forum Support Area for Unregistered Users & Account Problems
I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login.
Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies
LEARN ABOUT MOJAVE
pam_winbind.conf
PAM_WINBIND.CONF(5) 5 PAM_WINBIND.CONF(5)
NAME
pam_winbind.conf - Configuration file of PAM module for Winbind
DESCRIPTION
This configuration file is part of the samba(7) suite.
pam_winbind.conf is the configuration file for the pam_winbind PAM module. See pam_winbind(8) for further details.
SYNOPSIS
The pam_winbind.conf configuration file is a classic ini-style configuration file. There is only one section (global) where various options
are defined.
OPTIONS
pam_winbind supports several options which can either be set in the PAM configuration files or in the pam_winbind configuration file
situated at /etc/security/pam_winbind.conf. Options from the PAM configuration file take precedence to those from the pam_winbind.conf
configuration file.
debug = yes|no
Gives debugging output to syslog. Defaults to "no".
debug_state = yes|no
Gives detailed PAM state debugging output to syslog. Defaults to "no".
require_membership_of = [SID or NAME]
If this option is set, pam_winbind will only succeed if the user is a member of the given SID or NAME. A SID can be either a group-SID,
an alias-SID or even an user-SID. It is also possible to give a NAME instead of the SID. That name must have the form:
MYDOMAIN\mygroup or MYDOMAIN\myuser. pam_winbind will, in that case, lookup the SID internally. Note that NAME may not contain any
spaces. It is thus recommended to only use SIDs. You can verify the list of SIDs a user is a member of with wbinfo --user-sids=SID.
This setting is empty by default.
try_first_pass = yes|no
By default, pam_winbind tries to get the authentication token from a previous module. If no token is available it asks the user for the
old password. With this option, pam_winbind aborts with an error if no authentication token from a previous module is available. If a
primary password is not valid, PAM will prompt for a password. Default to "no".
krb5_auth = yes|no
pam_winbind can authenticate using Kerberos when winbindd is talking to an Active Directory domain controller. Kerberos authentication
must be enabled with this parameter. When Kerberos authentication can not succeed (e.g. due to clock skew), winbindd will fallback to
samlogon authentication over MSRPC. When this parameter is used in conjunction with winbind refresh tickets, winbind will keep your
Ticket Granting Ticket (TGT) uptodate by refreshing it whenever necessary. Defaults to "no".
krb5_ccache_type = [type]
When pam_winbind is configured to try kerberos authentication by enabling the krb5_auth option, it can store the retrieved Ticket
Granting Ticket (TGT) in a credential cache. The type of credential cache can be set with this option. Currently the only supported
value is: FILE. In that case a credential cache in the form of /tmp/krb5cc_UID will be created, where UID is replaced with the numeric
user id. Leave empty to just do kerberos authentication without having a ticket cache after the logon has succeeded. This setting is
empty by default.
cached_login = yes|no
Winbind allows to logon using cached credentials when winbind offline logon is enabled. To use this feature from the PAM module this
option must be set. Defaults to "no".
silent = yes|no
Do not emit any messages. Defaults to "no".
mkhomedir = yes|no
Create homedirectory for a user on-the-fly, option is valid in PAM session block. Defaults to "no".
warn_pwd_expire = days
Defines number of days before pam_winbind starts to warn about passwords that are going to expire. Defaults to 14 days.
SEE ALSO
pam_winbind(8), wbinfo(1), winbindd(8), smb.conf(5)
VERSION
This man page is correct for version 3 of Samba.
AUTHOR
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
This manpage was written by Jelmer Vernooij and Guenther Deschner.
Samba 3.6 06/18/2010 PAM_WINBIND.CONF(5)