09-09-2010
passwd on a simple script
hi guys
I am working on a script which is basically a menu for some linux operators...
I need on this menu for the operators the option to change the password...
This are 2 linux servers using Linux heartbeat.
what I need is to change change the password using passwd command and replica that change to the secondary server....
I've been trying to capture the output of passwd command to implement my script but I have not been able to do it and to reflect the new password on the other server still I don't have any idea.... I tried dsh (commands on multiples server but it did not work)
thanks a lot
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to lockout about 250 user accounts on a server. I figure on putting the user accounts to be locked out in a text file and the running a script to go through the file and run the "passwd -l useraccount" against the /etc/passwd file (yes, I am root as I do this).
Here is what I have so... (3 Replies)
Discussion started by: antalexi
3 Replies
2. UNIX for Advanced & Expert Users
HP-UX 11
I currently have a script that is running useradd and passwd commands to automate setting up new users. It was originally designed so that passwd was run with -d -f to delete a passwd and force user to set passwd at next login. Now mgmt wants instead to set a first-time passwd and have... (2 Replies)
Discussion started by: LisaS
2 Replies
3. Shell Programming and Scripting
Is there a way to change user password using passwd command in shell script?
I don't want to use expect.
Please help (8 Replies)
Discussion started by: corny
8 Replies
4. Shell Programming and Scripting
Hi All,
I have a requirment..
I need to pass a registry password to a command.. Actually when the command executed in the script, it will return some warnings first, then after it'll ask password like below,
$ cleartool rmtag -vob -all <vob_name>
Warnings: ------------------
Registry... (3 Replies)
Discussion started by: raghu.iv85
3 Replies
5. Solaris
Hi Folks,
I have Solaris 10, latest release.
We have passwd aging set in /etc/defalut/passwd.
I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging.
When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies
6. Shell Programming and Scripting
We have a business need to modify the /etc/passwd file every time a new user gets added, because the user ID begins with a zero. When you create the new user in smit, even if you put the leading zero in, it does not retain it when the entry is added.
That being said, I need to create a script... (11 Replies)
Discussion started by: mshilling
11 Replies
7. Solaris
Hello all,
Since Solaris passwd does not have --stdin option can you advise how to change the password for 30 users with a script. The password can be the same one. I`ve tried already echoing, xargs, cat and similar.
Thanks.
---------- Post updated at 04:04 AM ---------- Previous update... (0 Replies)
Discussion started by: click
0 Replies
8. Shell Programming and Scripting
Hi All,
From Audit point of view, I need to add a script to my production Solaris servers. That should be able to mail me, if any user is added or removed.
That means, I should get a mail, what user is deleted or added in /etc/passwd, i.e. if there is a change in this file, I should be... (8 Replies)
Discussion started by: solaris_1977
8 Replies
9. AIX
Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies
10. Shell Programming and Scripting
Hello all!
This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician.
Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix:
... (16 Replies)
Discussion started by: torchij
16 Replies
LEARN ABOUT NETBSD
yppasswdd
RPC.YPPASSWDD(8) BSD System Manager's Manual RPC.YPPASSWDD(8)
NAME
rpc.yppasswdd -- NIS update password file daemon
SYNOPSIS
rpc.yppasswdd [-d directory] [-noshell] [-nogecos] [-nopw] [-m arg1 [arg2 ...]]
DESCRIPTION
rpc.yppasswdd must be running on the NIS master server to allow users to change information in the password file.
The options are as follows:
-d directory Change the root directory of the password file from ``/'' to directory. It is important to create the binary database
files (pwd.db and spwd.db) when using this switch or the password change will fail. The databases need to be created
only once with the following command:
pwd_mkdb -d directory directory/etc/master.passwd
-noshell Don't allow changes of the shell field in the passwd file.
-nogecos Don't allow changes of the gecos field in the passwd file.
-nopw Don't allow changes of the password in the passwd file.
-m arg1 [arg2 ...]
Additional arguments to pass to make in /var/yp.
FILES
/etc/passwd
/etc/master.passwd
SEE ALSO
chpass(1), passwd(1), hosts_access(5), nis(8), ypbind(8), ypserv(8)
AUTHORS
Mats O Jansson <moj@stacken.kth.se>
BSD
February 26, 2005 BSD