Scripting to change passwords in a file

Hi There 
i am trying to change passwords of varies accounts mentioned in a configuration file; however there are more than 10 configuration files and i need to change there all user account password to Passw0rd.
Is there any power shell script i could use for this to change?
KB

Hi,
Is there any power shell script i could use for this to change?
Pre-written? Probably not. You can check the repository though:
http://gallery.technet.microsoft.com/scriptcenter
You'll probably have to write something yourself. These might help get you started:
http://ss64.com/ps/get-childitem.html
http://ss64.com/ps/get-content.html
http://ss64.com/ps/foreach-object.html
http://ss64.com/ps/set-adaccountpassword.html
Read this before doing anything with the last one:
http://connect.microsoft.com/PowerShell/feedback/details/777142/bug-in-set-adaccountpassword-cmdlet
I didn't know about that particular quirk until a few minutes ago.
Don't retire TechNet! -
(Don't give up yet - 12,950+ strong and growing)

Similar Messages

  • WLST script for changing password for userid in Weblogic 9.2

    Hello Everyone,
    We want to change password for userid in weblogic 9.2. Is there a way we can do this by using WLST script? If so please provide me with steps for doing that using WLST. Thanks in advance.
    - - Weblogic Consultant

    Did you try going to the WLST documentation and searching for it? Go to [http://edocs.bea.com/wls/docs92/pdf/config_scripting.pdf] and search for "Changing a Password". The example there seems to be what you need.

  • Disable change password in the file sharing window

    I have two labs, 25 computers per lab.  One is running Lion, the other is running Snow Leopard.  When file sharing to other computers in both labs on our network, it is required that you enter a password before you can access the files.  Lion offers the option to change that password for certain computers when file sharing with them.  I need to disable this feature so students cannot change the passwords randomly.  The students may not be able to change the password for other Lion computers, due to parental controls that I have set, I'm not positive, but they can change the password for a Snow Leopard computer, and my network people do not want me putting Lion on all of the computers, therefore this is not an option.  Is there any way for me to disable this feature?

    Hey, password file is a binary file, you are not suppose to do that.
    Drop prassword.ora file
    Use ORAPWD utility to create a new password file.
    Jaffar

  • Indesign Post Script name changing to back up file name

    Hi all
    I am in a pre press workflow that requires that I write a post-script file to a hot folder.
    So saving as a post-script is the only option for our entire workflow to take place.
    When saving the post script file from indesign , the name defaults to the back up file name which is
    not similar to the original file name. We deal with an extremely large number of pages
    and need for this file name to stay the same as the original not the back up. Manually putting these file names
    in is a serious chance for error and takes too much time.
    Does anyone know how to prevent the name from changing?
    Thanks for any help.

    You should be posting to the InDesign or Acrobat forum. Please repost there giving them your version of InDesign and Acrobat. Detail you method of creating the postscript file. You should be printing to file using the Adobe PDF printer instance. I only suggest the InDesign forum, since the print dialog box in InDesign is not a standard Windows Print dialog box.

  • Power shell script to change the Extension of file

    Hi All,
    i need to change the extension which is as .out file to .xml below is the pwershell script which i used
    $fileName="C:\temp\suj.txt"
    $newExtension="xml"
    [System.IO.Path]::ChangeExtension($filName, $newExtension)
    neither i get any error for the above script nor the extension is changing
    can onayone help me on this

    No worries
    i have used the below script
    Dir C:\temp *.out | rename-item -newname {  $_.name  -replace ".out",".xml"  }

  • A script to change back to original file names??

    Hi,
    I'm looking for a script for iPhoto that will give some photos back their original file names?
    or any way of doing that?
    cheers

    I have used apple scripts to correct time and dates?
    can this cause a problem?
    Probably not - although iPhoto probably will not recognize the modified information - but it is not a good idea to modify anything in the iPhoto library except using iPhoto - iPhoto '08 and later have a command to modify date and time - I do not think iPhoto 6 did, although its been a ling time now
    LN

  • Change password with apple script

    HI there,
    i'm using the do shell script "dscl . -passwd /Users/my username 1"
    it runs without problems but its not changing the password.
    please advise,
    Rafi.

    You are using "-test" instead of "-passwd" for starters
    then you have a space in the username:
    do shell script "dscl . -test /Users/ rafi test 123"
    should be
    do shell script "dscl . -password /Users/rafi test 123"
    I am not an expert in dscl, but the best way for you to test whether do shell script is going to work is to run it in Terminal first.

  • Is it possible to monitor State change of a .CSV file using powershell scripting ?

    Hi All,
    I just would like to know Is it possible to monitor State change of a .CSV file using powershell scripting ? We have SCOM tool which has that capability but there are some drawbacks in that for which we are not able to utilise that. So i would like
    to know is this possible using powershell.
    So if there is any number above 303 in the .CSV file then i need a email alert / notification for the same.
    Gautam.75801

    Hi Jrv,
    Thank you very much. I modified the above and it worked.
    Import-Csv C:\SCOM_Tasks\GCC2010Capacitymanagement\CapacityMgntData.csv | ?{$_.Mailboxes -gt 303} | Export-csv -path C:\SCOM_Tasks\Mbx_Above303.csv;
    Send-MailMessage -Attachments "C:\SCOM_Tasks\Mbx_Above303.csv" -To “[email protected]" -From “abc@xyz" -SMTPServer [email protected] -Subject “Mailboxex are above 303 in Exchange databases” -Body “Mailboxex are above 303 in Exchange databases" 
    Mailboxex - is the line which i want to monitor if the values there are above 303. And it will extract the lines with all above 303 to another CSV file and 2nd is a mail script to email me the same with the attachment of the 2nd extract.
    Gautam.75801

  • Script to change a character in a file and opening it in Numbers

    Hello,
    Is there an easy way with Applescript to replace all the "," with a "; " in a csv file and open it in Numbers ? The best would be to be able to drag/drop the file over an icon in the dock to do that.
    Thank you

    Yes, it's easy to do, but depends on the complexity of the csv file. For instance, if you're sure that the csv is simple (in the sense that commas only appear as delimiters and never occur inside text data), then the following will work. Save it as a script application and then drop your files on it):
    on open csvFiles
              repeat with thisFile in csvFiles
                        set fp to open for access thisFile with write permission
                        set csvText to read fp
                        set csvSplitText to tid of csvText by ","
                        set csvNewText to tid of csvSplitText by ";"
      set eof fp to 0
      write csvNewText to fp
      close access fp
              end repeat
    end open
    on tid of input by delim
      -- handler for text items
              set {oldTID, my text item delimiters} to {my text item delimiters, delim}
              if class of input is list then
                        set output to input as text
              else
                        set output to text items of input
              end if
              set my text item delimiters to oldTID
              return output
    end tid
    If you have a more complx csv format and you have to account for commas that are within text data, then it would help to know more about the structure of the document. I mean, it could be done generically, but I'd rather not fiddle with the code if I don't have to.

  • Jython having issue importing weblogic modules for changing passwords

    I am trying to import some WLST modules into a Jython script as outline in the documentation at http://e-docs.bea.com/wls/docs92/config_scripting/config_WLS.html#wp1019971
    The strange thing is that it says it is a WLST script, but it appears to be a Jython script. I tried performing this import using WLST interactive mode, but this did not work.
    I am passing the passwords as encrypted strings while using the encrypt() function
    Here is the script:
    import sys
    from weblogic.management.security.authentication import UserPasswordEditorMBean
    #To be invoked by java -cp /usr/local/bea/wlserver_10.0/common/lib/jython.jar org.python.util.jython
    #usage: wlst.sh ResetWLPassword.py <current_pass> <user> <new_pass> <adminServerURL>
    #{3DES}/asdfadsf== -
    #{3DES}asdfafdsadsf== -
    myPass = sys.argv[1]
    myUser = sys.argv[2]
    newPass = sys.argv[3]
    adminServerURL = sys.argv[4]
    #Connect
    try:
    connect('weblogic',myPass,adminServerURL)
    except:
    print "Could not connect using supplied credentials"
    dumpStack()
    try:
    print "Changing password ..."
    atnr=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")
    atnr.changeUserPassword(myUser,myuser,newPass)
    print "Changed password successfully"
    except:
    print "Password change failed"
    dumpStack()
    I am receiving the following error message:
    java -cp /usr/local/bea/wlserver_10.0/common/lib/jython.jar org.python.util.jython /tmp/ResetWLPassword.py "{3DES}/adsfadsfadsf==" weblogic "{3DES}asdfadsfasd== " t3://localhost:7003
    sys-package-mgr: can't create package cache dir, '/usr/local/bea/wlserver_10.0/common/lib/cachedir/packages'
    Traceback (innermost last):
    File "/tmp/ResetWLPassword.py", line 2, in ?
    ImportError: No module named management

    blumo wrote:
    You are calling org.python.util.jython again instead of weblogic.WLST like I advised in my first post. Invoke WLST (not jython) and pass your values in cleartext. Like I said in my previous post, I was able to execute your script without issue when calling WLST and passing cleartext values (I did have to modify one line to due a bug in your script -- see my prior posts).This seems to work in terms of getting the code to run, but there is still a problem with passing the arguments to the changeUserPassword() method.
    I entered the sequence of commands in the script manually into WLST and it works without issue. It even works without the import, which is strange that Oracle includes it in their documentation.
    I am going to post the code here, perhaps there is something wrong syntax-wise with the way I am authenticating, but I can't put my finger on it.
    import sys
    from weblogic.management.security.authentication import UserPasswordEditorMBean
    myPass = sys.argv[1]
    myUser = sys.argv[2]
    newPass = sys.argv[3]
    adminServerURL = sys.argv[4]
    #Connect
    try:
    connect(myUser,myPass,adminServerURL)
    except:
    print "Could not connect using supplied credentials"
    dumpStack()
    try:
    print "Changing password ..."
    atnr=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")
    #atnr.changeUserPassword('weblogic','weblogic','12345678')
    atnr.changeUserPassword(myUser,myPass,newPass)
    print "Changed password successfully"
    except:
    print "Password change failed"
    dumpStack()
    throws:
    Connecting to t3://localhost:7003 with userid weblogic ...
    This Exception occurred at Mon Feb 23 11:50:18 PST 2009.
    javax.naming.AuthenticationException [Root exception is java.lang.SecurityException: User: weblogic, failed to be authenticated.]
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:42)
         at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:773)
         at weblogic.jndi.WLInitialContextFactoryDelegate.pushSubject(WLInitialContextFactoryDelegate.java:670)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:466)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:373)
         at weblogic.jndi.Environment.getContext(Environment.java:307)
         at weblogic.jndi.Environment.getContext(Environment.java:277)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at weblogic.management.scripting.WLSTHelper.populateInitialContext(WLSTHelper.java:498)
         at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:551)
         at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:303)
         at weblogic.management.scripting.WLSTHelper.connect(WLSTHelper.java:201)
         at weblogic.management.scripting.WLScriptContext.connect(WLScriptContext.java:60)
         at weblogic.management.scripting.utils.WLSTUtil.initializeOnlineWLST(WLSTUtil.java:121)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:160)
         at org.python.core.PyMethod.__call__(PyMethod.java:96)
         at org.python.core.PyObject.__call__(PyObject.java:248)
         at org.python.core.PyObject.invoke(PyObject.java:2016)
         at org.python.pycode._pyx6.connect$1(<iostream>:16)
         at org.python.pycode._pyx6.call_function(<iostream>)
         at org.python.core.PyTableCode.call(PyTableCode.java:208)
         at org.python.core.PyTableCode.call(PyTableCode.java:404)
         at org.python.core.PyTableCode.call(PyTableCode.java:287)
         at org.python.core.PyFunction.__call__(PyFunction.java:179)
         at org.python.pycode._pyx18.f$0(/tmp/ResetWLPassword.py:20)
         at org.python.pycode._pyx18.call_function(/tmp/ResetWLPassword.py)
         at org.python.core.PyTableCode.call(PyTableCode.java:208)
         at org.python.core.PyCode.call(PyCode.java:14)
         at org.python.core.Py.runCode(Py.java:1135)
         at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
         at weblogic.management.scripting.WLST.main(WLST.java:106)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.WLST.main(WLST.java:29)
    Caused by: java.lang.SecurityException: User: weblogic, failed to be authenticated.
         at weblogic.common.internal.RMIBootServiceImpl.authenticate(RMIBootServiceImpl.java:116)
         at weblogic.common.internal.RMIBootServiceImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    Could not connect using supplied credentials
    Changing password ...
    Password change failed

  • Maxl Script will not write to error file for data laod.

    Sorry Glenn here is the new thread. I re ran without the semi colon after data 3 and the same error came up without anything being written to the error file.
    I purposely removed a member from the orginal outline that is included in the data loaded but yet the error file is not written to. I tried doing the load manually but executing it in the background, error file is to be created on my local HD but it does not write it there. Checked the output and it is written to a directory located on the server. Although i think this is normal.
    Could it be that it will not write to a local drive? I am going to try specifying a spot on the server to see if it runs there.
    thanks
    Original post below.
    Hello,
    I am also having this issue.
    I will include my script below but will state some details before
    We are on Essbase 11.1.1.3
    I am running Admin Console from my client PC that connects to the server in the script and I read that in this set up the error file will not get written to. This documentation was for v 9.1.3
    Here is my script (i changed some of the names)
    login 'user' 'password' on server';
    create application 'Money1' as 'Money2';
    spool stderr on to 'errorfile';
    import database 'Money1'.'Main' data
    from local text data_file 'Money1_Data.txt'
    using server rules_file 'Data3'
    on error append to 'dataload.err';
    execute calculation 'CALC ALL;' on 'Money1'.'Main';
    logout;
    spool off;
    exit;
    here is the error output i get:
    code line: on error append to 'dataload.err';
    Statement executed with warnings.
    (3) Syntax error near ['$']
    I don't see a dollar sign anywhere in my code and the error file does not get produced.
    Also do error files get written too if the actins are executed in the background?
    Thanks!
    Alex

    This works for me in a MaxL script run through essmsh.exe:
    import database appname.dbname data from local text data_file "d:\\datafilename.txt" using server rules_file "rulename"
         on error write to "d:\\errorfilename.err" ;Sometimes EAS (I think you are running it through that) does weird things to MaxL. I eschew MaxL in EAS as much as possible (like 100% of the time).
    NB -- the datafilename and errorfilename and their drive letters are local to wherever you're running this process through the MaxL shell. I don't know how that works when you're running EAS -- are drives local to your session, local to the EAS server? Dunno. Leave EAS behind, buy TextPad (no I am not the author of that fine product) and download the MaxL syntax library, and be happy. :)
    Regards,
    Cameron Lackpour
    Edited by: CL on Oct 7, 2010 7:12 AM
    Put the MaxL into a code block to get it to display correctly.

  • Number of days before user must change password.

    Hi,
    I understand how does this Essbase server setting work:
    Essbase Server Properties - Security Tab
    "Number of days before user must change password"
    But my question is:
    Does anyone know how "to mark" certain group of Users (mainly system admin accounts) - that this setting will not force periodical passoword change for "marked" users ?
    Any ideas ?
    Br, ripasso

    There are a couple of things you could do to circumnavigate this all or nothing option.
    You could write a maxl statement that would update the user profile to force the user to change their password e.g.
    alter user Fiona set password_reset_days immediate;
    I would write a program using the API that lists all users in the group and then dynamically create the maxl script that uses the statement above.
    If you can not use the API then I guess you could do a maxl only solution (using display user command) and do some text file manipulation in perl (or another scripting language).
    There are probably more solutions/ideas out there.

  • Shell Script to change filename.

    I'm need to use the Run Shell Script action to change a filename. Basically I need to drop the ".app" extension of an app on the desktop to get it to appear as a folder.
    I know I need to use:
    mv TemporaryApp.app TemporaryApp
    but am not sure what to use before this to get the shell script to recognize the file.
    Any help appreciated.
    Thanks,
    Kevin

    Thanks, John.
    But my requirement as follows,
    Is there a way to change user password using passwd command in shell script? I don't want to use expect. use the command passwd, it will ask for old password and then the new password twice.But I want to use it in a script without my interaction. I want to provide new password in a script a than run passwd to change user password. Problem of using passwd in shell script is that passwd requires user interaction to change password and script stops. My question was is there a way to use passwd without interaction or is there other way to change password using shell script.
    Thanks
    Ram

  • How to allow users to change password

    I have enabled users to change their passwords in the Server.app for the Default Site with SSL, and who can access is a group of individuals.
    When I load up the Server site, I am presented with
    a Login to which I then add my username and password and I am then presented with
    Welcome to OS X Server
    OS X Server makes it easier than ever for the people in your organization to collaborate, communicate, and share information.
    I Choose My Settings and the site is redirected to /changepassword of which a page comes
    Forbidden
    You don't have permission to access /auth/ on this server.
    The Directory /Library/Server/Web/Data/Sites/Default/auth/ exists with the corret permissions.  This is an empty directoy tho
    Apache Logs:
    Directory index forbidden by Options directive: /Library/Server/Web/Data/Sites/Default/auth/
    I cannot get this to work.  WIki's are turned on but that doesnt work either. 
    If I Launch /wiki, I am prompted to login, to with I do, and i just get a blank web page
    Apache logs:
    File does not exist: /Library/Server/Web/Data/Sites/Default/__collabd
    This is on a new install of OSX server
    Any Suggestions?

    Hi,
    On the landing page at the bottom it should say "change password".
    That brings you to a forbidden page?
    On my server I do not have the /auth/ folder in my default site, but my changepassword page does work.
    Can you check if going to https://127.0.0.1/changepassword does work? It will give an SSL error.
    Then it might be DNS related conflicting with another router/server in your network
    Or... charge $ 5 per user to change his or her password personally
    Goodluck!
    Jeffrey
    StarPine Support

  • Change Password in OBIEE 11.1.1.6.2

    Hi All,
    We are giving facility to the end users to change the respective password by logging into BI Publisher 11.1.1.6.2 where the Password Change Mechanism has been provided.So when the user change the password in Publisher then the same change will be reflected in OBIEE also.
    Now we have defined some rules for setting the password on Web-logic Console.SO when you try to change the password that rules should be applied while changing the password.
    Issue is that when you try to change the password in BI Publisher the rules are not getting applied.
    any help in this regard.

    Hi,
    I suggesting you better to go with LDAP athunthication. password changes everthing will be taking care by u r domain ctlr. no more option user to change password in obiee11g. the workaround i too tried it but its required couldn't completed its required webservices and j2ee/.net apexternal application code need to check it u r application code development team.drop me your email i can send my code.after getting this code u need to convert webservices and need to get discriptor jar/war file then need to deployit wia weblogic console.after theat JMX java bean need to run it
    In obiee11g users/roles are taking care by FMW.
    for the LDAP confuguration steps
    http://obieedue.blogspot.com/2012/01/obiee11g-integration-with-ldap-and.html
    Thanks
    Deva

Maybe you are looking for

  • TDE Wallets & Multiple Databases on same Host

    The Oracle TDE Best Practices (doc ID 130696) states this: Multiple databases on the same host If there are multiple Oracle Databases installed on the same server, they must access their own individual TDE wallet. Sharing the same wallet between inde

  • What can i do to get security questions back if i forgot my backup mail

    what can i do to get security questions back if i forgot my backup mail i had a little trouble with my apple id i bougth a gift card to itunes and would buy somthinigs   but something got wrong in the start when i maked the id  thinked that i could r

  • Send file as attachment via mail

    Dear All, I want to send a report (ALV) as attachment to some mail. I am using SO_NEW_DOCUMENT_SEND_API1. Can you please suggest how can I send mail as attachment. I am able to send ALV report as HTML format. I want to send it as attachment. Thanks a

  • Recover deleted requests from DSO

    Hello BI Experts, We have been deleted requests from standard DSO accidentally. The data has been deleleted for 3yrs and we have been trying to recover from Reconstruction tab but could not found anything there. Can any body tell me how to recover re

  • My phone got into blind people(voice guidance) mode how to come out of it??

    my phone got into blind people(voice guidance) mode how to come out of it, i switched off my mobile even though it is in the same mode plz help me out as early as possible.