Autogenerated userid

i want to create autogenerated userid
like i created password;
but problem is duplication of password is allowed so i don get much difficulty to implemement it
& now when i am trying to generate autogenerated user id constraint is it should be unique
here's code how i generate password automatically
{color:#ff0000}+public String generatePassword() { // generate a semi-random password+
Random rand = new Random(System.currentTimeMillis());
int pwlength = 5 rand.nextInt(4);{color}
+{color:#ff0000}+StringBuilder sb = new StringBuilder(); // generate ascii codes in the range of 48 - 57 (numbers), 65 - 90 (capitals) and 97 - 122 (lowercases){color}+
{color:#ff0000}+while (sb.length() < pwlength) { // 48+ 74 = 122, the maximum value allowed.{color}
+{color:#ff0000}+char chr = (char) (48 {color}+{color:#ff0000}rand.nextInt(74));{color}
+{color:#ff0000}+if ((chr >= '0' && chr <= '9') || (chr >= 'A' && chr <= 'Z') || (chr >= 'a' && chr <= 'z')) {{color}+
{color:#ff0000}+sb.append(chr);+
+}+
+}+
return sb.toString();
+}+
{color}
this code returns me one random password
now i want to generate one random userid
but it should follows following constraints::
1>it should be combination of first 3 character from username and random number of 5 digit
2> it should be unique
3> once id generated by fun. then it should check that weather this id present in db or not, if its not present then its ok; & if present generate another
4> repeate step until we didn find out any unique userid
5> example
if user name is john
then his id will start joh then 5 digit number
like joh12345 or joh00001 or joh56465 & so on...
how should i implement this??

While passwords should be strong and not easily guessed, I think userIDs should be easy for the end user to remember. They don't have to be strong. If an end user enters a bad userID and/or password, you produce an error message that says 'your userID and/or password is bad'. You dont say which one is bad since you will inform him if his guess of the userID is a valid customer's name.
Here are the rules I suggest for userID:
1: userID will consist of first name, period, last name. example: john.smith
2: if there is already a userID by that, include his middle inital. example: john.a.smith
3: if the userID still can't be generated because someone has the same middle inital (or he doesn't supply his middle initial), append the next unused number in a sequence to the name. Example: john.smith1, john.smith2, etc.
I also suggest you let them generate their own password. An auto generated one will be very difficult to remember and they are more likelly to write it down to remember it (which makes it unsafe). Here is my recommendations to validate they created a strong passord:
1: must be at least 8 char
2: two letters must be upper case
3: two letters must be lower case
4: two letters must be numbers
5: two letters must be any of the following special characters:
!@#$% (or specify a set of any special characters you want)
On the form, list the above rules he needs to generate a strong password and validate against it.

Similar Messages

  • SSO userid for a partner application

    Hi,
    We have one application deployed on WebLogic Application Server this is registred as Partner application over SSO server.
    On application side we have installed Oracle HTTP Server as webserver and configured mod_osso.
    Now when user attempt to access any secured page SSO askes for the authentication. And on successful login user landed back to application page configured while creating Partner application.
    After login we need userid of user who logged in on sso server. I have tried following and getting null.
    Remote User: <%=request.getRemoteUser() %>,
         Proxy-Remote-User: <%=request.getHeader("Proxy-Remote-User") %>
         Osso-User-Dn: <%=request.getHeader("Osso-User-Dn") %>
         Osso-User-Guid: <%=request.getHeader("Osso-User-Guid") %>
         Osso-Subscriber: <%=request.getHeader("Osso-Subscriber") %>
         Osso-Subscriber-Dn: <%=request.getHeader("Osso-Subscriber-Dn") %>
         Osso-Subscriber-Guid: <%=request.getHeader("Osso-Subscriber-Guid") %>
         Accept-Language: <%=request.getHeader("Accept-Language") %>
    output:
    Remote User: null,
    Proxy-Remote-User: null
    Osso-User-Dn: null
    Osso-User-Guid: null
    Osso-Subscriber: null
    Osso-Subscriber-Dn: null
    Osso-Subscriber-Guid: null
    Accept-Language: en-us,en;q=0.5
    Is any one there knows, what exactly i should do?
    Thanks & Regards,
    Kevin Chheda

    So the user has successfully authenticated and can access protected areas of the application?
    Have you tried using Http headers to see values/attribute names?
    Can you try this:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
    <body>
    <%@ page import = "java.util.*" %>
    <h1>Headers received:</h1>
    Remote user header is: <% out.println(request.getRemoteUser()); %>
    <p>
    <table>
    <%
    Enumeration headerNames = request.getHeaderNames();
    while(headerNames.hasMoreElements()) {
    String headerName = (String)headerNames.nextElement();
    out.println("<tr><td>" + headerName);
    out.println(" <td>" + request.getHeader(headerName));
    %>
    </table>
    </body></html>

  • Autogeneration issue in ABAP----urgent please.

    I want to do the Auto generation technique.
    Like I have role code - RC001.
    Max value i have RC007.
    I need this value to be autogenerated that automatically it wil be RC008.
    For this I have used SPLIT RC and 007 separate but when i add 007 its giving 8 as a output not 008.
    I need ouput as RC008.
    Please help me.
    Regards
    Deepanker

    RC007
    split into RC00 and 7 and add 7+1 = 8
    and concatenate RC00 8..
    or strln (RC007) = 5.
    var+4(1) = lv_add
    lv_add = lv_add+1.
    concatenate.
    Hope this helps

  • How to catch SSO userid and store it in deployment database?

    Hi,
    Environment: OID,Portal,forms,reports 9.0.2.3
    How do I do if I have a SSO user, lets say DAVE, and he has a resource pointing to a Deployment database un/pw@ORAC? When he has made his SSO login and choose a form I want store his real userid in the database ORAC. For example in v$session and in a history table. I want to be able to trace a blocking session back to the real user.

    Hi i
    from the form i set the default value of the field form_user_name PORTAL.WWCTX_API.GET_USER and the default fomat type to expression return varchar
    Now
    =======
    the authenticated user id appears in the field form_user_name and is inserted properly in the oirder table
    Question
    ========
    i want every authenticated user can query only his orders which means when he prss the query button , he will get his orders only
    How can i force the where clause of the query to have
    form_user_name = PORTAL.WWCTX_API.GET_USER
    Regards
    Mohamed Hammed

  • How to get Win NT userid for setting VPD application context?

    We are planning to implement row-level security using VPD. For that to happen, we need to capture the Windows NT userid since all the applications connect through a generic Oracle userid which will not help us.
    Has anyone done this before? Your responses are appreciated.
    Thanks.

    SELECT osuser
    FROM v$session
    WHERE audsid = (SELECT USERENV ('sessionid') FROM dual)

  • How to get SSO userid to URL-based app?

    I'm developing a web-app using Struts that will be accessed by Portal (I guess as a URL-based app). The web-app will not require login. The web-app will not be Portal "aware", except that it requires the SSO userid for auditing/logging purposes.
    I know little about Portal and SSO. How can Portal be configured to send the Portal userid of the logged-in Portal user? Can it send it as a parameter in a GET or POST?
    The version of Portal will be 9.0.2 (or greater).

    This topic is answered in the PDK forum here:
    How to get SSO userid to URL-based app?

  • Some of the user information is displaying as domain\userid in site web analytics report under top visitors list

    Hi,
    When I was checking the top visitors list under web analytics report I see few user names as full name and most of other users as domain\userid. How can i show all the list as user full name.
    We are using SharePoint 2010.
    Thanks in advance!!!!!!
    Rithu

    Hi,
    This might be problem with User Profile service configuration settings.  Please refer to the similar post.
    http://social.technet.microsoft.com/Forums/en-US/0857f140-84f8-4c7c-a0e0-7b3e79d9619b/sharepoint-server-2010-display-name-issue-with-top-visitors-web-analytic-report?forum=sharepointadminprevious
    Please mark it answered, if your problem resolved.

  • Hi! ... When configuring my new iPad, it says the UserId is already in use and I cannot progress any more. Of course it's in use, it's my UserId. How do I continue ?? ... Thanks in advance

    Hi! ... When configuring my new iPad, it says the UserId is already in use and I cannot progress any more. Of course it's in use, it's my UserId. How do I continue ?? ... Thanks in advance

    Did you select "Sign In with an Apple ID" as opposed to "Create a free Apple ID" when setting it up?

  • How to use srw.run_report without userid parameter in 10g

    I have the following function which works fine when I supply the userid parameter.
    Is it possible to run srw.run_report without the userid? If not is there another way to run a batch report to create a file?
    create or replace
    FUNCTION SUNRESDS(vopersorjudicial varchar2)
    RETURN VARCHAR2 as
    myPlist SRW_PARAMLIST;
    myIdent SRW.Job_Ident;
    BEGIN
    myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
    srw.add_parameter(myPlist,'GATEWAY','http://xxx.xx.xxx.xx/reports/rwservlet');
    srw.add_parameter(myPlist,'SERVER','rep_172_FRHome1');
    srw.add_parameter(myPlist,'REPORT','d:\oracle\FRHome_1\forms\sunresds.jsp');
    srw.add_parameter(myPlist,'USERID','username/password@databasename');
    srw.add_parameter(myPlist,'DESTYPE','file');
    srw.add_parameter(myPlist,'DESFORMAT','PDF');
    srw.add_parameter(myPlist,'popersorjudicial',vopersorjudicial);
    srw.add_parameter(myPlist,'DESNAME','d:\Reports\unresolved_discrepancies.pdf');
    myIdent := srw.run_report(myPlist);
    return 'Y';
    EXCEPTION
    when others then
    return ('sunresds ' || sqlerrm);
    END;

    Did you solve your problem? How did you do?

  • SSO Configuration not working - Still asking for Userid and password

    Hi Guys,
    I have configured Portal to use with backend server. Configured WAS & ITS and created System Alias.
    For Testing SSO I did following steps on portal:
    System Administration > Support > SAP Appliction > SAP Transaction
    Selected system Alias and tcode se12. Selected SAPGUI for HTML. Pressed Go.
    Instead of SE12 screen, I get Logon Screen asking for USERID and password.
    I should be getting SE12 screen directly without entering USERID and PASSWORD.
    I tested with Transaction iView (SE12)  and getting the same logon screen. After entering userid/password  it displays SAP Easy Access menu instead of displaying SE12
    Please help.
    Thanks a lot.
    mini

    Hi Sandeep.
    Thanks for your reply. Here are the answers to your questions:
    1. Is the username same in the portal and the backend that you are trying to connect, ensure that there is the same username that exists in the system you want to connect to. YES
    2. The ticket is imported properly- check the ACL and Certificate list in Tcode STRUSTSSO2.
    Ticket is valid from 01 Jan 2009 to 14 Mar 2012.
    3. Check for the parameters in place login_accept_ticket = 1 and login_create_ticket = 2 and icm_hostname_full is set to FQDN. 
    In RZ10 it has 3 parameters:
    login/accept_sso2_ticket = 1
    login/create_sso2_ticket = 2
    icm/host_name_full = sapecc6.tri.com 
    4. What is the result when you test the system connection?
    WAS & ITS Connections are successful.
    Connection test for Connectors is giving following results:
    Results
    Retrieval of default alias successful
    Connection failed. Make sure user mapping is set correctly and all connection properties are correct.
    My Connectors Details:
    Application Host : sapecc6
    Gateway Host : sapecc6.tri.com
    Gateway Host : 3301
    SAP Client : 800
    SAP Client : EC7
    SAP System Number : 01
    Server Port: 3201
    System Type: SAP_R3
    I am using same userid for Portal and backend.
    5. Are the 2 systems that you want to configure SSO in the same domain?
    I am trying to connect R3 to Portal.
    Please give me directions to fix the problem.

  • BSP - UserId and Password for Internal Users - Anonymous for other users

    Hello,
    We developed an application via BSP's. This application can be accessed by two kind of users.
    1. External Users, with should access the page without using a userId and password.
    2. Internal Users, they will have more authorisation and need to specify their userId and Password.
    How can we accomplish this? I tried internal aliases, but can't get it to work properly.
    In the first service 'zbsp' I didn't specify a userId and password in sicf.
    Then I created an internal alias 'zbsp' referring to this 'zbsp'. In this alias I specified a userId and Password, but the system still asks for a userId and Password. (and after logging in the system gives the following error: The application name in URL .../bc/bsp/sap/zbsp2/uat_report.htm is invalid.)
    What did I do wrong? Or are there other ways to accomplish this?
    Greetings,
    Bart

    Take a look at the following mesaages that discussed the whole SSO and SSO2 ticket logins.
    As for a way to handle the two different login types. Well first and formost - active the SSO Tickets on your system.  Set your BSP up for that.
    Then create a new starting page with an alias to the pöublic section for BSP's in your system. On this page make two links.
    For your external users - one that redirects to your BSP passing the user and password in the url for the "read only external user" - that's the sap-user=name here&sap-password=passwordhere.
    For your internal people give them simply the link to the BSP which when they click it will see no user name and password and redirect them to the BSP login.
    Make sure you setup the BSP login according to SAP note 517860 and follow the instructions from http://help.sap.com/saphelp_nw04/helpdata/en/1d/13c73cee4fb55be10000000a114084/frameset.htm using the supplied SYSTEM_PUBLIC)
    It's a bit basic but it works, we do it
    Oh and setting up the system for the SSO (transaction sso2) is very very simple!!

  • Hi, how to develop application , matching of userid and password to backend

    hi masters ,
                  , user  have to give userid and password of back end sap system  to see particular report. i mean there is a first view ( this first view muust not be first screen of portal ) with userid and password fields . after gave his id and password he can go to second view to see the particualr details .please suggest me about how to do custom bapi code and , in also  webdynpro java  how to develop .
               i know about sso. in this concept i have to use through webdynpro java only. no need of sso concept here .
              after giving the  userid and password , those details must be match with  backend sap database.if no  one of userid and passwrod field  is  matching it has to show some error message. and in password field must be in encrypted letters .

    hi surya,
    Use JCO api to create connection to the backend.
    [JCO tutorial|http://www.apentia-forum.de/viewtopic.php?t=1962&sid=9ac1506bdb153c14edaf891300bfde25]
    On the webdynpro screen you can ask users to enter login id and password. Use this information to create connection to backend using JCO.
    Hope this helps!
    Monalisa

  • How to authenticate userid and password of b2b user in a b2c portal

    I am having a reqirement in B2C web portal , where in i have to create two input text fields which will accept userid and password ( the userid and password will be of b2b users)and button to logon and if i click on the logon button, it should take into b2b web portal. Is it possible? if possible please help me in this issue.
    Please get back to me if i am not clear in my requirement.
    Thanks a lot in advance!
    lakshman reddy G.
    <MOVED BY MODERATOR TO THE CORRECT FORUM>
    Edited by: Alvaro Tejada Galindo on Oct 6, 2008 6:07 PM

    To get an idea check these links.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/aaa1a890-0201-0010-eb93-ae3d2bb74a78
    BSP/HowTo - Customizing the design of System Logon page in NetWeaver '04
    -Aman

  • Web report without userid and password

    Hi Experts,
    I exported a BW web report to excel spreadsheet and sent it through mail to others, When recepients tried to open that exported spreadsheet, It is prompting for userid and password. I dont want this to be happened and it should open without asking userid / passsword? Can any one suggest some clues onthis.

    Check to see if they are looking at the data or running the report.  If they are running the report, then they will be prompted for the user id and password.
    You can run the report for them and download the data only, then they will not get the prompts, however they will not be able to update the data or drill down.
    Alternatively, you can use the Broadcaster to send out the updated reports directly to them.
    Brian

  • Access to my Windows "Store" is only via my Wife's MS Live Sign-In UserID and there is No Way to Change it I can Find

    THE ISSUE:
    Whenever i go to the Windows Store on my 8.1 Pro Laptop and try to install **Anything**, Windows asks for me to sign onto my Windows Account but **ONLY** Offers me the choice of signing onto my Wife's account.
    NOTES:
    (1) I have already signed onto my Microsoft Account: at the time of booting into Windows on my Laptop [i.e., entered my "[email protected]' MS Live userid for signing in].
    (2) There are no Options (that I can find) within the Windows Store to allow me to designate a Different ID (That is: My Windows ID [email protected], rather than my wife's Windows ID of '[email protected]').  That is, the sign-on screen comes
    up **Automatically** with the UserID of my wife ("[email protected]"), ONLYT allowing me to enter the **Password** for That Particular UserId - but **Not** change the UserID
    (3) When I then go to my Browser and sign into Microsoft Live **directly** with my [email protected] MS Live Userid, there are no Options **Anywhere** in my ID Profile, Account, - OR Anywhere Else [I looked at Every Menu Option for my MS Live account]
    to allow me to ensure that the ID "[email protected]" is somehow an alias that I can delete, or in any other way "Tell" MS Live to ONLY use my [email protected] MS Live Account for the MS Store.  Simply Speaking: that ID [My
    wife's "[email protected]" ID] does NOT Show Up ANYWHERE under ANY Menu in my Microsoft Live Account, so even if I sign [again, since it did it at Boot time also already] into my MS Live Account, there is nowhere where there is some "Option"
    to somehow "Turn Off" the recognition of ONLY my wife's Microsoft Live ID from my Window's Store.
    Yes, I suppose I **Could** simply ask my wife for her ID - EXCEPT Guess What?  She asked for it to be deleted when she ran into MS Login problems on her laptop (perhaps because she forgot the PW) and I've been told recently By MS Support that indeed
    it has been deleted.
    Sooo:  Is There Any Way To Even Manually (in the Registry or elsewhere) Fix This Issue?
    [B-T-W:  I think the problem originally occurred when my wife tried to purchase MS Office 365 University and had major problems creating a MS Live ID and being able to Login to get to her machine.  Once she had purchased the subscription
    - which was for TWO Machines - I used her ID at that time to try and get access to the install files for a copy MS Office 365 University to install on **My** laptop as well.  I think that is when I originally was able to input her ID ("[email protected]")
    somewhere as I tried to get to Office 365, which was purchased under her "[email protected]" ID.  It Never Worked - because she forgot her password somehow, so I eventually gave up on that approach and she asked for her money back for her
    purchase of MS Office 365 University and was given nit back.  Since I still wanted MS Office 365 University, I used a link from an email sent me by Microsoft to purchase, download, and install MS Office 365 University thru my OWN [email protected]
    MS Live account.  But this never succeeded in "Changing" this issue I've described above of all access to MS Store coming up with my wife's "[email protected]" MS Live ID automatically to sign into the Store.]

    FangZhou:
    What I meant by the sentence "ONLY Offers me the choice of signing onto my Wife's account." is
    that my Windows Store shows my Wife's OLD (I say "OLD" because according to Microsoft, it has since been deleted) Microsoft Account UserID - NOT **My** UserID, and doesn't allow for any means or option to switch out the UserID that is being presented.
     It only allows for input on the password, which won't do me any good, since my wife (1) Doesn't remember her hardly-ever-used Microsoft Account userid Password and (2) I really should be able to use my **Own** Microsoft Account UserID anyway, to which
    I **do** know the password.
    In any case, I ran the Troubleshooter you pointed me to (Thanks!).  But the Troubleshooter did **Not** complete successfully, because the ms-windows-store:PurgeCaches file is **Missing** (this error message came up while the Troubleshooter was running,
    and also the Troubleshooter results indicated only one of the three problems it found with the Windows Store on my machine had been fixed, the principle cause being exactly because this particular file is indeed missing) ==> see the following messages cut
    'n pasted from the Troubleshooter's Results:
    Windows Store Apps
    Publisher details
    Issues found
    Windows Store cache may be damaged
    Windows Store cache may be damaged
    <data id="Description" name="Description"></data>
    Not fixed
    Reset and open Windows Store
    Completed
    Windows Store configuration may be damaged
    Windows Store configuration may be damaged
    <data id="Description" name="Description"></data>
    Detected
    Re-register Windows Store
    Completed
    Some security settings are missing or have been changed
    Some security settings are missing or have been changed
    <data id="Description" name="Description">Some apps might not have access to required resources</data>
    Fixed
    Reset security settings
    Completed
    Now that I've run this Troubleshooter, I have a **Completely Different [and seemingly WORSE] Problem** with the Windows Store on my machine:  when I click on it, I am sent Right Back to my Windows Desktop - every time.  I don't even get Into the
    Windows Store AT ALL - immediately after clicking, the screen changes back to The Desktop.
    Any Thoughts on how I rebuild/recreate this Windows Store Cache file; or otherwise fix my access to Windows Store now?

Maybe you are looking for