Sponsored Content
Top Forums Shell Programming and Scripting Urgent Korn Shell scripting Help Pleaaaase... Post 302301022 by solaix14 on Wednesday 25th of March 2009 03:35:44 PM
Old 03-25-2009
Urgent Korn Shell scripting Help Pleaaaase...

Hello All,
Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation.
I tried providing the input file as the value for password field but password change requires tty so my password from an input file obviously wont gonna work.
Any help will be really appreciated.
Because of this road-block, I have not been able to move on with the main scripting.

thanks in advance.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

demineur in korn shell:urgent.

hello. have please a demineur programmed in shell korn (unix).???? can you send it to me??? thanks. (0 Replies)
Discussion started by: raul
0 Replies

2. UNIX for Advanced & Expert Users

Minesweeper in korn shell:urgent

if you have the programme of Minesweeper;take me it because i need it. thank u very much. (1 Reply)
Discussion started by: raul
1 Replies

3. Shell Programming and Scripting

Repost-Korn Shell Scripting

Hi, being very new to Korn Shell Scripting I am hoping that someone here can help me. I want to compare file name in scp/inbox directory to file name stored inside a file in pnt/compare directory. Hi, being very new to Korn Shell Scripting I am hoping that someone here can help me. I want to... (1 Reply)
Discussion started by: hanie123
1 Replies

4. UNIX for Dummies Questions & Answers

Help with Korn Shell Scripting

Hi I'm new to scripting and I don't know where to start. I need to create a script that needs to look for specific files in a specific folder then I need to return the filename, the recordcount, bytecount and checksums. Then I need to write these results into a new file. I would appreciate... (2 Replies)
Discussion started by: th0123
2 Replies

5. Shell Programming and Scripting

Solaris Korn Shell Scripting

I have made the following simple script: a=0 let a=$a+1 if "] then mailx -s "Up" abc@yahoo.com fi When I run the above script, I get the following error: # ./new.ksh ./new.ksh: ]: not found. Please tell me how to use if here? (6 Replies)
Discussion started by: kamaldeep1986
6 Replies

6. Shell Programming and Scripting

Korn shell scripting

I am attempting to learn shell programming using o'rielly book "Learning the Korn Shell". I am finding it pretty difficult to do since the only access I have to unix boxes are running version 99 of ksh. The book utilizes ksh93 and there appear to be many differences. I can't even follow along... (2 Replies)
Discussion started by: vedder191
2 Replies

7. UNIX for Advanced & Expert Users

Comparison in Korn shell scripting

I have a scenario to implement in Korn shell script. Here it is.. I need to compare two values to see whether they are same or not. The issue is that the values coming in for comparison can be a string or an integer which can be determined during run time only. Which korn shell comparison... (2 Replies)
Discussion started by: vani123
2 Replies

8. Homework & Coursework Questions

korn shell scripting

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: There is a menu driven program and there are some fields to be achived 3. Display contents of all .lst files... (3 Replies)
Discussion started by: jainitai
3 Replies

9. Shell Programming and Scripting

Need urgent help with korn shell script

Hi All, Need urgent help with korn shell script, which monitors AIX WPARs Status. Basically WPARs run on a LPAR, So there is a Command "lswpar" which displays WPARs status. This script should be checking the WPARs Status and email support if WPAR is down or broken. General lswpar output is as... (3 Replies)
Discussion started by: aix_admin_007
3 Replies

10. Shell Programming and Scripting

Help needed in Korn Shell scripting

#! /bin/ksh while read line do if ] ; then echo "no data" continue; fi echo "performing operation on $line" done < prg.txt (3 Replies)
Discussion started by: Juhi Kashyap
3 Replies
passwd(1)						      General Commands Manual							 passwd(1)

NAME
passwd - change user password SYNOPSIS
passwd [-f|-g|-s|-k[-q]] [name] passwd [-D binddn][-n min][-x max][-w warn][-i inact] account passwd [-D binddn] {-l|-u|-d|-S[-a]|-e} name passwd --bioapi [account] passwd --stdin [account] DESCRIPTION
passwd changes passwords for user and group accounts. While an administrator may change the password for any account or group, a normal user is only allowed to change the password for their own account. passwd also changes account information, such as the full name of the user, their login shell, password expiry dates and intervals or disable an account. passwd is written to work through the PAM API. Essentially, it initializes itself as a "passwd" service and utilizes configured "password" modules to authenticate and then update a user's password. A sample /etc/pam.d/passwd file might look like this: #%PAM-1.0 auth required pam_unix2.so nullok account required pam_unix2.so password required pam_pwcheck.so nullok password required pam_unix2.so nullok use_first_pass use_authtok session required pam_unix2.so Password Changes If an old password is present, the user is first promted for it and the password is compared agaisnt the stored one. This can be changed, depending which PAM modules are used. An administrator is permitted to bypass this step so that forgotten passwords may be changed. After the user is authenticated, password aging information are checked to see if the user is permitted to change their password at this time. Else passwd refuses to change the password. The user is then prompted for a replacement password. Care must be taken to not include special control characters or characters, which are not available on all keyboards. If the password is accepted, passwd will prompt again and compare the second entry against the first. Both entries are require to match in order for the password to be changed. OPTIONS
-f Change the finger (gecos) information. This are the users fullname, office room number, office phone number and home phone number. This information is stored in the /etc/passwd file and typically printed by finger(1) and similiar programs. -g With this option, the password for the named group will be changed. -s This option is used to change the user login shell. A normal user may only change the login shell for their own account, the super user may change the login shell for any account. -k Keep non-expired authentication tokens. The password will only be changed if it is expired. -q Try to be quiet. This option can only be used with -k. Password expiry information -n min With this option the minimum number of days between password changes is changed. A value of zero for this field indicates that the user may change her password at any time. Else the user will not be permitted to change the password until min days have elapsed. -x max With this option the maximum number of days during which a password is valid is changed. When maxdays plus lastday is less than the current day, the user will be required to change his password before being able to use the account. -w warn With this option the number of days of warning before a password change is required can be changed. This option is the number of days prior to the password expiring that a user will be warned the password is about to expire. -i inact This option is used to set the number of days of inactivity after a password has expired before the account is locked. A user whose account is locked must contact the system administrator before being able to use the account again. A value of -1 disables this feature. Account maintenance -l A system administrator can lock the account of the specified user. -u A system administrator can unlock the specified account, if the account is not passwordless afterwards (it will not unlock an account that has only "!" as a password). -d The password of the given account can be deleted by the system administrator. If the BioAPI interface is used the BioAPI data for that account is removed. -S Report password status on the named account. The first part indicates if the user account is locked (LK), has no password (NP), or has an existing or locked password (PS). The second part gives the date of the last password change. The next parts are the minimum age, maximum age, warning period, and inactivity period for the password. -a Report the password status for all accounts. Can only be used in conjunction with -S. -e The user will be forced to change the password at next login. -P path Search passwd and shadow file in path. This option cannot be used with changing passwords. --bioapi This option is used to indicate that passwd should use the BioAPI for managing the authentication token of an account. It is only supported with a small subset of other options. This option is not always available. --stdin This option is used to indicate that passwd should read the new password from standard input, which can be a pipe (only by a system administrator). Name service switch options -D binddn Use the Distinguished Name binddn to bind to the LDAP directory. FILES
passwd - user account information shadow - shadow user account information SEE ALSO
passwd(1), group(5), passwd(5), shadow(5), pam(5) AUTHOR
Thorsten Kukuk <kukuk@suse.de> pwdutils November 2005 passwd(1)
All times are GMT -4. The time now is 01:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy