If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > Automate user password change

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-13-07, 19:18
docjav docjav is offline
Registered User
 
Join Date: Feb 2007
Posts: 3
Automate user password change

Hello,

I would like to create a script that will change a particular user's password at the end of the day. We use IBM AIX 5.2 OS. The user id is "bsi" ..which is a superuser that we turn on a default password for vendor. After they have logged off the system we change it back to the inhouse systems default. I would like to change it back to systems default at the end of the day once it has been changed.

Any suggestions or ideas would be most appreciated.

Thank,

Jav
Reply With Quote
  #2 (permalink)  
Old 02-14-07, 03:31
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
You can use the OS APIs in a small program to set the password as was done in the attachment. Just rename the file to "setpwd.c".
Attached Files
File Type: txt setpwd.c.txt (5.9 KB, 152 views)
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #3 (permalink)  
Old 02-14-07, 11:53
docjav docjav is offline
Registered User
 
Join Date: Feb 2007
Posts: 3
Thank you for the program. When I compile it, I get the following message:

ld: 0706-027 The -A a flag is ignored.

Am I missing some environment variable?

Thanks,
Jav
Reply With Quote
  #4 (permalink)  
Old 02-15-07, 06:24
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
How do you try to compile it? I compiled/linked it with the statement given in the first comment of the source code.
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #5 (permalink)  
Old 02-15-07, 10:37
docjav docjav is offline
Registered User
 
Join Date: Feb 2007
Posts: 3
Yes..I also used the command that is in the source code:

cc -o setpwd setpwd.c -ls
Reply With Quote
  #6 (permalink)  
Old 02-16-07, 02:59
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
What is the complete output you see during compile?
Have you tried another compiler like xlc_r?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On