Script to set password in HP-UX 11.31


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Script to set password in HP-UX 11.31
# 1  
Old 08-30-2013
HP Script to set password in HP-UX 11.31

Hi,

I am unable to set the password remotely. I am using the script as below:

Code:
ep=`echo "$p" | /usr/lbin/makekey`

ssh -t $i "/usr/local/bin/sudo useradd -c "$user_c" -m -d /home/$user_id -s /bin/ksh $user_id; /usr/local/bin/sudo /usr/sam/lbin/usermod.sam -F -p $ep $user_id"

The command used to set the password is working. However, when I am trying to login with the set password it says access denied. Can anybody help me on this please ?

Thanks,
Ankit

Last edited by Kits; 09-02-2013 at 07:12 AM.. Reason: Added the last line
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to set user password to never expire in UNIX servers

Hi, I have a requirement where in i need to write a shell script to set users password to never expire. I know the command which is used to perform the same .. which is chage command. But, could not figure out how to do the same in shell script. Could you please help me with the shell... (3 Replies)
Discussion started by: suren424
3 Replies

2. Solaris

Set password in bash script without manual entry-Solaris 10

Hi I have a root script which is setting up user and his dirs and so on. After I create user and set up all the necessary I have to manually set user password. I try all possible ways what google find me and nothing works for me. If maybe one of you have a solution for my problem it will be... (1 Reply)
Discussion started by: Jaffakeks
1 Replies

3. Solaris

Not able to set password

I have a Solaris-10 non global zone, on which I am not able to reset password, while counts are matching in /etc/passwd and /etc/shadow. I tried searching its solution in various forums, but nothing is working # id -a oemagent uid=56605(oemagent) gid=56595(tess) groups=56595(tess) # passwd -s... (2 Replies)
Discussion started by: solaris_1977
2 Replies

4. Shell Programming and Scripting

Need a script to set non-expiry password

Hi All, I have a gateway server, from where I can connect any server via 'sudo ssh server_name'. Generally, if we need to run a command on any number of servers, we put server names in a file like '/tmp/ser_name' and execute it with for loop from gateway server. Now, I need to set non-expiry... (0 Replies)
Discussion started by: solaris_1977
0 Replies

5. Shell Programming and Scripting

Help to set permission on password files in script

Hi Techies I am stuck in a problem, I have written a script which is calling a second script which contains some command and password for quering on database. I do not want to disclose this command or specially password file. Please help.. Please have a look on directory structure and... (2 Replies)
Discussion started by: atul9806
2 Replies

6. Shell Programming and Scripting

script to set the password from *LK* to *NP*

okay here I go again... I have created a script which adds new user to /etc/password and which inturn creating a locked password in /etc/shadow but I am expecting to have *NP* for that particular user.Can someone help me with a script which can set the password for a particular user to NP in... (1 Reply)
Discussion started by: sintilash
1 Replies

7. Shell Programming and Scripting

how to set password/encrypt a shell script

Hi, I have written a shell script in unix for my customer. Now I want to make it only execute and not to read/write. Can anybody help me how to set password protect/encript my script. Thanks Suresh (3 Replies)
Discussion started by: suresh3566
3 Replies

8. Shell Programming and Scripting

Can I set Password to open my shell script?

Hi All, please help me on how to secure my shell script? I chnanged it to read-only mode using 'chmod'. but still i would like to set password for open the script. Is there any way? Please help me!! Thankyou all in advance!! :b: (6 Replies)
Discussion started by: little_wonder
6 Replies

9. Solaris

Not able to (re)set the Password

I have installed Solaris 10 x86 in VMware 5.5.I logged in as root user and trying to create new user and also reset the password for existing user, i am getting "Permission Denied Error". I checked the /etc/shadow file, looks fine permission is 400. Earlier i was able to do it but suddenly it... (2 Replies)
Discussion started by: khagendra
2 Replies

10. Shell Programming and Scripting

set password using a shell script

Hi All How can I set password in linux.It is OK if it display password in plain text in script. manually i can set: #passwd Changing password for root Enter new password: Bad password: too weak. Re-enter new password: Password changed. # I want this to be done by script.Please let me... (2 Replies)
Discussion started by: tannu
2 Replies
Login or Register to Ask a Question
SCRIPT-EMAIL(8) 					  System Administration Commands					   SCRIPT-EMAIL(8)

NAME
script-email - Amanda script to send email notifications DESCRIPTION
script-email is an Amanda script implementing the Script API. It should not be run by users directly. It sends a notification email to the addresses specified in the MAILTO property. PROPERTIES
This section lists the properties that control script-email's functionality. See amanda-scripts(7) for information on the Script API, script configuration. MAILTO List of email addresses that will receive an email on command execution. It is a multi-valued property: property "MAILTO" "amanda@domain.com" "sysadmin@domain.com" "amandauser@domain.com" EXAMPLE
In this example, script-email is scheduled to be run before the DLE, on the server. The unqualified email address amanda will be passed to the email system unchanged. The script is then attached to a dumptype, which can then be specified for any DLEs which require notification. define script-tool pre-email { comment "email me before this DLE is backed up" plugin "script-email" execute-on pre-dle-backup execute-where server property "mailto" "amanda" } define dumptype user-tar-email { user-tar script "pre-email" } SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7) The Amanda Wiki: : http://wiki.zmanda.com/ AUTHORS
Jean-Louis Martineau <martineau@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Dustin J. Mitchell <dustin@zmanda.com> Zmanda, Inc. (http://www.zmanda.com) Amanda 3.3.3 01/10/2013 SCRIPT-EMAIL(8)