No password expiration date

Hi all,
I am working on a web service in order to modify the password expiration date.
In particular, they requested me to set password never expires at user's creation moment.
I wrote something like this:
uacc = UMFactory.getUserAccountFactory().newUserAccount(susUserName, newUser.getUniqueID());
uacc.setPassword(susUserPassword);
                         uacc.setPasswordChangeRequired(false);
but users continue to be created with the usual password expiration date.
I tried to search something in my library that could help me, but with no luck. In particular, I tried using the method setPasswodExpirationDate of ISecurityPolicy and of class SecurityPolicy, but I cannot find a method to link this methods to user account. I have also seen that changing the security policy to "Technical User" I may overcome the problem, but the method setSecurityPolicy is not implemented in the libraries on server.
Could you please give me some advices on this topic? I really do not have anymore ideas.
Best Regards,
Francesco Macaluso

Use the below code to set your user as technical user.
              IUserAccountFactory uaFactory= UMFactory.getUserAccountFactory();
              IUserAccount userAccount=uaFactory.getUserAccountByLogonId("<userID");
              IUserAccount mutableUserAccount=uaFactory.getMutableUserAccount(userAccount.getUniqueID());
              mutableUserAccount.setAttribute("com.sap.security.core.usermanagement","SecurityPolicy",new String[]{IUserAccount.SECURITY_POLICY_TYPE_TECHNICAL});              
              mutableUserAccount.commit();
Thanks
Prashant

Similar Messages

  • How can I display the password expiration date for a user

    I have created a GUI (using PrimalForms) which runs powershel scripts to pull information like user ID, email address, last logon ec. for the helpdesk to help establish the validity of some user claims of "it worked yesterday" and the like.
    I have been asked to add the password expiration date, but I am struggling to get the code for this addition.
    Does anyone know how I can include this, and have it in a human readable format?
    The current scripts (there are 3) allow the helpdesk staff to search on user ID and display name, the third provides the last logon, it was impossible to include this in the other scripts so I added an extra search button and called it good. An example of
    these scripts is below (please note, PrimalForms needs a slightly different syntax in order to get the results displayed, but the core script is standard PS, I use Powershell 3.0)
    $results.Text=Get-ADUser -Filter "sAMAccountName -eq '$($EntryBox.text)'" -Properties DisplayName, sAMAccountName, mail, extensionattribute5, PasswordLastSet, PasswordExpired, PasswordNeverExpires, buMemberOf, telephoneNumber, msExchOmaAdminWirelessEnable, whenCreated, whenChanged, enabled, AccountExpirationDate | select givenName, surname, DisplayName, sAMAccountName, mail, extensionattribute5, PasswordLastSet, PasswordExpired, PasswordNeverExpires, buMemberOf, telephoneNumber, msExchOmaAdminWirelessEnable, whenCreated, whenChanged, enabled, AccountExpirationDate | Out-String
    $results.Focus()
    for info:
    $results.text is the window in the GUI results are displayed  in
    $entrybox.text is the text box the helpdesk staff use to input the user ID or display name of the account they are querying
    $results.focus simply tells the script to put the results in the results.text window
    The screenshot below shows the current setup, this is purely to put the above information into perspective. Obviously some of the information displayed has been removed/redacted along with our logo.

    Hi,
    Here's an example you can build from:
    $maxPasswordAge = 120
    Get-ADUser USER -Properties PasswordLastSet |
    Select SamAccountName,
    PasswordLastSet,
    @{N='PasswordLifeRemaining';E={$maxPasswordAge - ((Get-Date) - $_.PasswordLastSet).Days}},
    @{N='PasswordExpirationDate';E={(Get-Date $_.PasswordLastSet).AddDays($maxPasswordAge)}}
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Password expire date back to 2011 from 2012  after assigned  a user profile

    Friends,
    I created a profile test as
    COMPOSITE_LIMIT UNLIMITED
    SESSIONS_PER_USER UNLIMITED
    CPU_PER_SESSION UNLIMITED
    CPU_PER_CALL UNLIMITED
    LOGICAL_READS_PER_SESSION UNLIMITED
    LOGICAL_READS_PER_CALL UNLIMITED
    IDLE_TIME 60
    CONNECT_TIME UNLIMITED
    PRIVATE_SGA UNLIMITED
    FAILED_LOGIN_ATTEMPTS 5
    PASSWORD_LIFE_TIME 120
    PASSWORD_REUSE_TIME           60
    PASSWORD_REUSE_MAX           30
    PASSWORD_VERIFY_FUNCTION NULL
    PASSWORD_LOCK_TIME 1
    PASSWORD_GRACE_TIME 7;
    the user default profile default PASSWORD_LIFE_TIME is 180 and password expired date is 1/7/2012. the test account was created in 7/11/2011.
    Now I assign test user to test profile successfully.
    However. expire date becomes 11/8/2011 1 from 1/7/2012 by select dba_users
    which wrong is in my profile or somewhere?
    As I think, the account password expired should be start after assigned new profile with PASSWORD_LIFE_TIME. but is seems expire date is start from original account created date.
    Thanks
    newdba
    Edited by: Oradb on May 24, 2012 1:56 PM

    I would think the expire time would be based on the last password change time which Oracle stores in the rdbms base table for user information (user$). Find a second user, alter the password, check the expire date, then assign the user to the new profile, re-check the expiration date. Post back. Behavior may vary between releases so include full Oracle version of test.
    HTH -- Mark D Powell --

  • Get Password Expiration Date of Group members in Active Directory

    hi,
    How can I get password Expiration date of Group members in Active Directory – please advise me
    Fasil CV

    Or DSQUERY Commands.
    dsget group "CN=Group1,DC=myinfralab,DC=com" -members | dsget user - -acctexpires
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • Password expiration date is moving

    I am observing password expiration date extended beyond actual expiration date even after selecting �expire regardless of warning� option with the Global password policy set with 60 max age and 14 day expiration period.
    documention says:
    Expire regardless of warning. This checkbox determines the effect of a password warning. The checkbox is selected by default, and passwords will expire exactly at the time determined by the expiration policy. If a user binds within the warning period, the server will indicate the length of time remaining before expiration.
    When this checkbox is deselected, the password expiration date will be extended when a user binds within the warning period. The server will automatically modify the expiration date to allow the user a full warning period before expiration. For example, if the warning period is seven days, the first time that a user binds within the warning period, the definitive expiration will be set to 7 days from the bind time. No further warnings will be sent and the password expiration will not be extended again.
    In all cases, the user will not be able to bind after the password expires, even if no warning was sent because the user did not bind within the warning period.
    my observation is:
    The expiration date is being extended once whether option (expire regardless of warning) is checked or not. If the option is �OFF� it allows user to login/reset/change his password after the expiration, and if the option is �ON� it does not allow user to login/reset/change his password after expiration as long as no warning issued.
    any clue why? am i have to do any additioanl configuraitons to keep the expiration date same as determined by the Password Policy?
    -sFed

    Or DSQUERY Commands.
    dsget group "CN=Group1,DC=myinfralab,DC=com" -members | dsget user - -acctexpires
    Santhosh Sivarajan | Houston, TX | www.sivarajan.com
    ITIL,MCITP,MCTS,MCSE (W2K3/W2K/NT4),MCSA(W2K3/W2K/MSG),Network+,CCNA
    Windows Server 2012 Book - Migrating from 2008 to Windows Server 2012
    Blogs: Blogs
    Twitter: Twitter
    LinkedIn: LinkedIn
    Facebook: Facebook
    Microsoft Virtual Academy:
    Microsoft Virtual Academy
    This posting is provided AS IS with no warranties, and confers no rights.

  • EWS: How can I retrieve password expiration date?

    Hi,
    I am using EWS API's in web application. Can you please tell me how can I get the exchange account password expiration date?
    I tried this:https://code.msdn.microsoft.com/office/Exchange-2013-Get-the-date-3a92c007
    But no luck, please help.
    Thanks,
    Prashant Mahajan

    Hello Prashant,
    Good Day..
    Request you to please try the below command.
    Get-ADUser -identity username -properties *
    For More Info:
    http://oxfordsbsguy.com/2013/11/25/powershell-get-aduser-to-retrieve-password-last-set-and-expiry-information/
    Regards,
    Praveen
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts @ Techrid.com

  • Why user portal30 has password expiration date active if it's "never expires"?

    after 3 months of installing and confuguring portal we had to change password... because of expiration date. Is it normal?
    Krzysiek

    Yes it's normal. If you don't want to see the change password screen then edit login serevr configuration and set password expire to large value. thanks.

  • Internet Sales - Password Expiration Date

    We are running:
      - Internet Sales 4.0
      - CRM 4.0
      - Developer Workplace SP19
      - J2EE Engine 6.4
    We will have 8,000 customers logging into our Internet Sales application which connects to CRM.  Our CRM security policy is that passwords expire every 60 days. That applies to internal users.  We don't want our customers passwords to expire every 60 days.  What can we do?  We would like to have a different security policy for our customers than for internal users.

    Right. Furthermore it has some functional impact - see <a href="https://service.sap.com/sap/support/notes/622464">SAP Note 622464</a>: SAP Logon Tickets will not be issued for SERVICE and SYSTEM users; that impacts the ability to use SSO; currently SAP Logon Tickets are also required if you only want to use FORM-based authentication (i.e. an HTML rendered logon screen) instead of Basic Authenitication (-> popup rendered locally by the browser).

  • SharePoint Service Accounts - Passwords have expiration date when they are set to never expire

    The managed accounts in my farm all have the Enable automatic password change
    unchecked.  Also these same accounts in AD have the Password never expires
    checked. 
    If I use get-spmanagedaccount to view the accounts, some passwords show as already expired or have a future expiration date.  The automatic change is set to False and nothing is listed under the Change Schedule. 
    The strange thing to me is that the passwords listed as expired are still valid and haven't been changed.  I even ran an iisreset just to check and there were no issues.  When I look in CA the next password change area is blank for all accounts.
    My question is why do the accounts list a password expiration date if it's set to
    not automatically change passwords.  If you do change the password through AD you will see a new expiration date set for 90 days later.  I'm just wondering how much I should worry about the service accounts that are listed
    as having expired passwords even though the passwords aren't expired.  My sites and services are running but I'm just curious if this could potentially cause other errors.
    Thoughts?  Prayers?  Condolences?
    Jennifer Knight (MCITP, MCPD)

    I checked the My farm as well, you are correct. Even you did not select the automatic password change still it showed 90 days as expiry. 
    You don't need to worry about it, it will not hurt, one of the dev farm having account which  expired almost 10 months ago. :)
    you can double check with in central admin and you will see no expiration set over their.
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. ****************************************************************************************** Thanks -WS MCITP(SharePoint 2010, 2013) Blog: http://wscheema.com/blog

  • How can I change the User Password expiry date

    Hi,
    I want to know how can I change the password expiration date of my user without changing his password. For eg:-
    User password expires on 12th May 2007. I want to extend to 12th Jun 2007. Is there any option in Oracle.
    Alter User <USERNAME> password expire .....<to new date>;

    The command is not alter user set expire...
    You should modify the user's profile, and set a timeframe:
    ALTER PROFILE DEFAULT LIMIT
    PASSWORD_LIFE_TIME = num_of_days;
    This way your password will be valid from the last time it was changed and for the time frame previously defined.
    ~ Madrid.

  • Process Password Expiration

    I wish to know how can I search for users who have certain password expiration date.
    For example, base on the date, I would like to send different emails to user. 1 months before expiration date, user receives a reminder email, 7 days before expiration date, user receives a warning email.
    I don't want to scan one by one all the users, get user object, then get the expiration date and do the comparison. I think this is too slow for a big number of users.
    Is there any faster way? for example by using attribute condition? How?
    Thank you,
    Steve

    I've done this a couple times using the per-account reconciliation workflow. Its certainly not glamorous, but it does work.
    The requirement was to notify AD users one moth and one week before password expiration. Reconciliation was run nightly against AD and I added a per-account workflow. The workflow checked the account expiration attribute and calculated how far it was away from today. If it was 30 or 7 days, I send an email reminder to the user.
    The solution did not significantly impact performance. A couple things you'll need to keep in mind. One, add a bunch of conditions up front to keep the speed up. Two, the variable userName is available in the per-account workflow when the recon condition is MATCHED. Finally, you're bound to your reconciliation schedule, so you may have to do some conditionals to make sure you aren't reminding people every night or every week.

  • Password expiration notification workflow

    I need to create a workflow which will send emails to users who's password is about to expire. For reasons I don't want to get into here, I don't want to use a defered task.
    I know there's got to be a way of grabbing a list of users along the lines of
    select all users with waveset.passwordExpiry >= date1 and <= date2
    Can anyone point me in the right direction?

    I need to create a workflow which will send emails to
    users who's password is about to expire. For reasons
    I don't want to get into here, I don't want to use a
    defered task.
    I know there's got to be a way of grabbing a list of
    users along the lines of
    select all users with waveset.passwordExpiry >= date1
    and <= date2
    Can anyone point me in the right direction?Did you happen to get a solution to this? I am trying both query options and to list users with a password expiration date - but to no avail
    <Rule name='GetUsersWithPasswordExpirationDate'>
        <RuleArgument name="aDate"/>
            <block>
                        <block>
                            <defvar name='queryOptions'>
                                <new class='com.waveset.object.QueryOptions'/>
                            </defvar>
                            <invoke name='addCondition'>
                                <ref>queryOptions</ref>
                                <s>passwordExpiry</s>
                                <ref>aDate</ref>
                            </invoke>
                            <invoke name='toList'>
                                <invoke name='getObjects'>
                                    <invoke name='getLighthouseContext'>
                                    <ref>WF_CONTEXT</ref>
                                </invoke>
                                <invoke class='com.waveset.object.Type' name='findType'>
                                    <s>User</s>
                                </invoke>
                                <invoke name='toMap'>
                                    <ref>queryOptions</ref>
                                </invoke>
                            </invoke>
                        </invoke>
                    </block>
        </block>
    </Rule>
    <Rule name="GetUsersWithPasswordExpirationDate">
        <RuleArgument name="aDate"/>
        <expression>
            <block trace='true'>
                <cond>
                    <ref>aDate</ref>
                    <invoke name='toList'>
                        <invoke name='listObjects'>
                            <invoke name='getLighthouseContext'>
                                <ref>WF_CONTEXT</ref>
                            </invoke>
                            <s>User</s>
                            <map>
                                <s>attributes</s>
                                <map>
                                    <s>passwordExpiry</s>
                                    <ref>aDate</ref>
                                </map>
                                <s>nameOnly</s>
                                <Boolean>true</Boolean>
                            </map>
                        </invoke>
                        <s>name</s>
                    </invoke>
                </cond>
            </block>
        </expression>
    </Rule>

  • Turn of password expiration

    Oracle 11g R2.
    Try to reset the password expiration date to never expire. Someone suggested:
    ALTER PROFILE DEFAULT LIMIT
    FAILED_LOGIN_ATTEMPTS UNLIMITED
    PASSWORD_LIFE_TIME UNLIMITED;
    AND, also issue:
    NOAUDIT ALL;
    DELETE FROM SYS.AUD$;
    Should I use these commands?
    Thanks

    scottjhn wrote:
    Oracle 11g R2.
    Try to reset the password expiration date to never expire. Someone suggested:
    ALTER PROFILE DEFAULT LIMIT
    FAILED_LOGIN_ATTEMPTS UNLIMITED
    PASSWORD_LIFE_TIME UNLIMITED;
    AND, also issue:
    NOAUDIT ALL;
    DELETE FROM SYS.AUD$;
    Should I use these commands?
    ThanksWhether or not you should use those commands depends entirely on what you want to achieve. Your subject line suggests you want to make passwords have an unlimited lifetime. What does turning off auditing and flushing the audit table have to do with that? What does FAILED_LOGIN_ATTEMPTS UNLIMITED have to do with that?
    The only command that will "turn off" password expiration would be ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
    And that will only affect passwords that are changed or created after the change to the profile. And only for those users who are using the profile specified in "ALTER PROFILE <profile name>.
    Some additional information is [url http://edstevensdba.wordpress.com/2012/01/16/exploring-password-lifetime-and-grace-period/]here

  • Password expiration mail and schedule tasks

    Dear Experts,
    To best of my observation OIM has OOTB feature to send mail on password expiry.
    Kindly suggest how do I find
    Query1 – how many days password get expired?
    Query2 – Which mail will be send to user when password expires?
    Query3 – Which schedule task does this?
    OIM version is 9.1.0.2.
    Kindly suggest.
    Thanks,
    S M

    In OIM 10g the schedule task name is Password Expiration Task. This task sends e-mail to users whose password expiration date has passed at the time when the task runs. It is determined by the USR table field USR_PWD_EXPIRE_DATE. The email template name is given as one of the attributes to this schedule task. That particular email is sent. The name of the email definition is "Password Expired". After that it updates the USR_PWD_EXPIRED flag on the user profile.
    Edited by: Durgaprasad on Apr 9, 2013 11:15 PM

  • How To Change Default Expiration Date for Portal User in Linux and Windows?

    Hello,
    I have a couple of environments I recently installed:
    1. Oracle Application Server 10 Release 2 (10.1.2) SEOne on Windows
    2. Oracle Application Server 10g Release 2 (10.1.2) Enterprise Edition on Linux
    I heard the portal and orcladmin user passwords will expire in about 60 days. I want to prevent this from happening. How can I set the expiration date to never expire for both these users? Or at least give me some warning?
    I heard that you can do this through the Oracle Directory Manager. However, I am unsure as which server to enter on the field. I've used the following:
    <servername>.hostname.com/389
    <DBname>.hostname.com/389
    They say 389 is the default port. Since I did not really
    Does anyone have any ideas?

    You have the answer in yours hands:
    Search for "60 days" in the forum
    How can I enfore Password Expiry Without Lockout?
    for instance.
    For the servername, it's the name of your server and the port is depending of your platform (have a look to $ORACLE_HOME_INFRA/install/portlist.ini) and
    chech the value for: Oracle Internet Directory port
    Patrick.

Maybe you are looking for

  • Fonts are loaded in TypeKit but they won't sync to my Adobe software

    Hi, Everytime I re-open any of my CC packaged such as Indesign, Illustrator the fonts I have loade din my Typekit refuse to sync and are always shown as missing. Typekit is on and it shows the fints on there as synced. Each day I have to remove the f

  • Using Mail with GMAIL (Pop)

    Has anyone experienced the following issue? I have set up my two gmail accounts to work with Mail on my new MacBook and for some reason the Mail program is not receiving all the mail. I know I am getting more mail than what is showing up because GMAI

  • Problem in executing javaFX application in web browser.

    Hi,   When i execute javafx application in web browser the outcome will not fit to the screen.    so what modifications i have to make so that it fits to the screen.

  • EP Role assignment to User.

    Hi, I have recently installed EP. When i assigned a New role Created (role i created) to a new User, The Contents assigned to that role is not getting displayed. But, when i also assign a super admin role to the user, the content of new role is getti

  • Lost "sent" messages

    I deleted my mail account and started a new mail account. How do I retrieve my "sent" messages from the account I deleted?