Sponsored Content
Full Discussion: passwd in shell script
Top Forums Shell Programming and Scripting passwd in shell script Post 302090929 by corny on Thursday 28th of September 2006 07:14:53 AM
Old 09-28-2006
Yes I want
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to "su" along with passwd within a shell script?

Hi, I have a shell script in which I need to switch user and execute some commands and then come back to the original user. To make it more clear - I have to log in as user xxx (this user is not root)- then 'su' to yyy - execute a script called zzz - then logout to xxx. The problem I am... (2 Replies)
Discussion started by: unique
2 Replies

2. Shell Programming and Scripting

Why passwd isnt working in shell scripts?

I had to write a script to change my login password, and the script wasnt working fine. When I searched through the previous postings in this forum, I got the solution (using 'expect' tool). But I would like to know why passwd command isnt working in scripts? (1 Reply)
Discussion started by: Deepa
1 Replies

3. Shell Programming and Scripting

Change /etc/passwd shell to telnet with parameters

Hello *nix users, I'm wondering if there's a way to change a user's default shell in /etc/passwd to the telnet program along with some parameters. For instance: user:x:1001:1001::/home/user:/usr/bin/telnet localhost 12345 The above line in the /etc/passwd file gives the following error... (2 Replies)
Discussion started by: tux0084
2 Replies

4. Red Hat

Root shell in /etc/passwd is corrupted

I accidentally changed root shell from /bin/bash to bash in /etc/password, then logged out from root. Now I can't login as root and got "No shell" error, although I have root password. "su -f -s /bin/bash" command does NOT work. There is no GUI interface for this system. My question: Do I have... (7 Replies)
Discussion started by: aixlover
7 Replies

5. Solaris

passwd cmd reenables passwd aging in shadow entry

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

Help required to write shell script to change passwd

Hi All, I wanted to write a shell script which will change the expired passwd in oracle. Here is below what I am trying, #!/bin/sh set -x ORACLE_HOME="/optware/oracle/9.2.0.2_64" SQLPLUS="${ORACLE_HOME}/bin/sqlplus" PASS="xyz" PATH=$ORACLE_HOME/bin:$PATH... (0 Replies)
Discussion started by: gr8_usk
0 Replies

7. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

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

8. Shell Programming and Scripting

Dont want to mention user id passwd in shell script

Hi, i have one shell script which transfers files from one server to other server through FTP, but i can see login id and password is not mentioned. kindly help to understand the script.then how below script is working if login and password is not mentioned in script #!/bin/sh... (1 Reply)
Discussion started by: ni3b007
1 Replies

9. Shell Programming and Scripting

Ssh passwd less, shell script

Hi All, Wishes!! I need some help to prepare a script to copy the public key from admin host to multiple client hosts to make them login without password. Detailed : I have an admin host "admin1" and i generated sshkeygen, now i have id_rsa.pub and i have around 50 client hosts. i... (4 Replies)
Discussion started by: kumar85shiv
4 Replies

10. UNIX for Advanced & Expert Users

Big problem: shell entry in /etc/passwd corrupted for user root

did a big mistake, changing root entry of /etc/passwd to root:x:0:0:root:/root:/usr/bin/tmux split-window -v \; attach as expected, now I can't login as root anymore. sudo ed /etc/passwd etc. doesn't work. Any idea? Use code tags to increase readability and follow the rules. (4 Replies)
Discussion started by: dodona
4 Replies
yppasswd(1)						      General Commands Manual						       yppasswd(1)

NAME
yppasswd, ypchfn, ypchsh - change your password in the NIS database SYNOPSIS
yppasswd [-f] [-l] [-p] [user] ypchfn [user] ypchsh [user] DESCRIPTION
In the old days, the standard passwd(1), chfn(1) and chsh(1) tools could not be used under Linux to change the users NIS password, shell and GECOS information. For changing the NIS information, they were replaced by their NIS counterparts, yppasswd, ypchfn and ypchsh. Today, this versions are deprecated and should not be used any longer. Using the command line switches, you can choose whether to update your password -p, your login shell -l, or your GECOS field -f, or a com- bination of them. yppasswd implies the -p option, if no other option is given. If you use the -f or -l option, you also need to add the -p flag. ypchfn implies the -f option, and ypchsh -l. When invoked without the user argument, the account information for the invoking user will be updated, otherwise that of user will be updated. This option is only available to the super-user. If the yppasswdd daemon on the server supports it, you can give the root password of the server instead of the users [old] password. All tools will first prompt the user for the current NIS password needed for authentication with the yppasswdd(8) daemon. Subsequently, the program prompts for the updated information: yppasswd or -p Change the user's NIS password. The user is prompted for the new password. While typing the password, echoing is turned off, so the password does not appear on the screen. An empty password is rejected, as are passwords shorter than six characters. The user will then be requested to retype the password to make sure it wasn't misspelled the first time. ypchsh or -l Change the user's login shell. The user is prompted for a new shell, offering the old one as default: Login shell [/bin/sh]: _ To accept the default, simply press return. To clear the shell field in your passwd(5) file entry (so that the system's default shell is selected), enter the string none. ypchfn or -f Change the user's full name and related information. Traditionally, some applications expect the GECOS field (field 4) of the passwd(5) file to contain the user's real name (as opposed to the login name) plus some additional information like the office phone number. This information is displayed by finger(1) and probably some other tools, too. When setting the full name, ypchfn displays the following prompts, with the defaults in brackets: Name [Joe Doe]: Location [2nd floor, bldg 34]: Office Phone [12345]: Home Phone []: To accept a default, simply press return. To clear a field, enter the string none. SEE ALSO
chfn(1), chsh(1), finger(1), passwd(5), passwd(1), ypcat(1), yppasswdd(8), ypserv(8), ypwhich(1) AUTHOR
yppasswd is part of the yp-tools package, which was written by Thorsten Kukuk <kukuk@suse.de>. YP Tools 2.9 June 2004 yppasswd(1)
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy