How to pass KDC server address and REALM in Krb5LoginModule ??

Hi All,
I want to pass KDC server address and REALM in Krb5LoginModule() with using configuration file or command line options.
I tried with initialize method of Krb5LoginModule() with passing KDC configuration parameters in sharedState.
Map state = new HashMap();
state.put("javax.security.auth.login.name", "user");
state.put("javax.security.auth.login.password", "pass");
state.put("java.security.krb5.realm", "TEST.COM");
state.put("java.security.krb5.kdc", "kdc.test.com");
Map options = new HashMap();
options.put("debug", "true");
options.put("tryFirstPass", "true");
options.put("useTicketCache", "true");
options.put("doNotPrompt", "true");
options.put("storePass", "false");
options.put("forwardable", "true");
Krb5LoginModule login = null;
try {
login = new Krb5LoginModule();
login.initialize(new Subject(), new TextCallbackHandler(), state, options);
if(login.login()){
login.commit();
But i getting this exception:
[root@localhost TEST]# java JaasAcn1
Debug is true storeKey false useTicketCache true useKeyTab false doNotPrompt true ticketCache is null isInitiator true KeyTab is null refreshKrb5Config is false principal is null tryFirstPass is true useFirstPass is false storePass is false clearPass is false
Acquire TGT from Cache
Principal is null
null credentials from Ticket Cache
username from shared state is user
username from shared state is user
Exception in thread "main" java.lang.ClassCastException: java.lang.String
at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:773)
at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:654)
at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:503)
at JaasAcn1.main(JaasAcn1.java:31)
Please give some pointers to solve the problem.
Thanks in advance.
Regards,
raj singh

The exception
Exception in thread "main" java.lang.ClassCastException: java.lang.String
at com.sun.security.auth.module.Krb5LoginModule.promptForPass(Krb5LoginModule.java:773)
at com.sun.security.auth.module.Krb5LoginModule.attemptAuthentication(Krb5LoginModule.java:654)
at com.sun.security.auth.module.Krb5LoginModule.login(Krb5LoginModule.java:503)
at JaasAcn1.main(JaasAcn1.java:31)clearly shows that your format for password is wrong in the shared state. String is evil, use char[] instead. Here it should be "pass".toCharArray().

Similar Messages

  • "Back to my Mac isn't working properly because your DNS server isn't responding. Contact your ISP for an alternate DNS server address, and enter it in Network Preferences".

    Hi, i am trying to setup back to my mac at home but I get the error "Back to my Mac isn't working properly because your DNS server isn't responding. Contact your ISP for an alternate DNS server address, and enter it in Network Preferences".
    There is no documentation on how to solve this anywhere.
    I have an Arris router set to bridged mode which is connected to a 5th generation airport extreme. I have tried using the google dns servers instead of the one assigned by the cable company in the AE but I still get the same error.
    Any help would be much appreciated
    Kenneth

    New to BTMM, I got stung today with the silly DNS problem message. Solution:
    1) Flush DNS cache with:
    dscacheutil -flushcache;sudo killall -HUP mDNSResponder
    2)System preferences > iCloud > untick BTMM then tick it again. The warning should have disappeared.
    Edit #1
    Apologies for the noise. The warning has come back
    Edit #2
    Just found out that BTMM is not compatible with double NAT. That's not helpful.
    http://support.apple.com/kb/TS1208

  • How to get report Server Name and Environment ID in Report

    How to print report Server Name and Environment ID in Report 10G.(Through in package or others)
    I'm also using Oracle Application Server 10G.

    Hi,
    Server and envid are the parameters passed along with Reports URL call.
    These variables value can be traped in Report by defining SERVER , ENVID named user parameters.
    Once trapped, can be printed on Report.
    Just ensure that these users parameters are not exposed to Parameter page, otherwise user may end up changing it.
    Thanks

  • The negotiation with the VPN server failed. Verify the server address and try reconnecting

    Hi folks,
    I am unable to connect VPN, While connecting error occurred. Can anyone advice how to solve this issue.
    "The negotiation with the VPN server failed. Verify the server address and try reconnecting"
    Thanks
    Vinoth

    This might help, at least from Harald's post onwards.

  • HT4915 How do you stop syncing address and calendar to iCloud? I only want to sync  from my computer to iPhone.

    How do you stop syncing address and calendar to iCloud? I only want to sync  from my computer to iPhone.  This is because I cannont upgrade to Lion and I do not want to get duplicate contacts when I sync from the computer 10.6.8 to my iPhone iOS5.  You should not upgrade to Lion upless you have 4GB of ram. Lion does not support rosita so all your old programs will not funtion and you have to repurchase all old software the is working fine.

    Welcome to the Apple Community.
    Settings > iCloud, turn off contact and calendar syncing.

  • How to check Integration Server Client and ABAP stack Client?

    How to check Integration Server Client and ABAP stack Client? How to check,,pls tell in detailed steps???
    Points would be awarded.
    Arnab

    hi,
    Must be the server has different clients,one declared as application server ie abap stack client and the other declared as Integration server ie XI. U might be trying to open idx5 in application server client, in which idx5  exists but you cant open the screen even, that can be achieved through we02.
    000 is the default client when  XI server is installed .We can create separate clients on the system through sccl tcode.
    As told we can find the client  on sap logon screen.
    Logon to sxmb_adm and check whether the client is declared as an application system(r/3) or Integration server(xi).Try idx5 in xi not r/3
    Edited by: NagaDurga Nannapaneni on Aug 28, 2008 11:36 AM

  • How do I remove server os and install normal os?  The computer has never been used as a server.  I only purchased the server version because of two internal hard drives.

    How do I remove server os and install normal os?  The computer has never been used as a server.  I only purchased the server version because of two internal hard drives.

    If you want to just disable the Server aspect, this should work for both Lion and Mountain Lion...
    http://support.apple.com/kb/HT4827
    If you want to completely start over, backup your /Users and /Applications directories and re-install the client OS.

  • Cockpit- How to find B1i Server Address

    Hi,
    I am trying to enable Dashboard. It is asking for B1i Server address. I have tried "http://127.0.0.1:8080/B1iXcellerator/exec/ipo/vP.001sap0004.in_HCSX/com.sap.b1i.vplatform.runtime/INB_HT_CALL_SYNC_XPT/INB_HT_CALL_SYNC_XPT.ipo/proc" but it gave me an error message that it is unable to connect. Does anybody know how to find B1i server address?
    Thanks.
    Abdul...

    Abdul,
    Instead of using 127.0.0.1 ... try using either the actual B1i Servers IP address or the name of the machine.  You can also review the B1iC troubleshooting guide here ...
    [Guide Deleted 31 OCT 2011 - Contained Out of Date Information]
    Eddy
    Edited by: Jason Lax on Oct 31, 2011 10:48 AM

  • How to delete iCloud email address and not iCloud service

    how to delete iCloud email address and not iCloud service.
    It is very anoying that I can't cancel icloud email address. Can someone help me?

    You can't delete either the account or the email address. If you are getting messages to it you don't want to see, go to http://icloud.com and to the Mail page: click on the cogwheel icon at bottom left and choose 'Rules'. Then set up a Rule to move all messages to your address to the Trash.

  • How do i Rescue email address and how to reset Apple ID and security questions

    how do i Rescue email address and how to reset Apple ID and security questions

    this may help http://support.apple.com/kb/HT5312

  • How to determine which IP address and port is used to make DNS queries?

    I am using JNDI/DNS API to query a Enum server (Tel URI resolution in VOIP world) what is a DNS server.
    But I have many network interfaces, in a VLAN environment, and I must to specify from which interface (and port)
    all the requests are sent.
    When I read the code of JNDI/DNS API (in JDK 1.5) and specially the DNSClient class, I can see that the
    DatagramSocket is created without parameters... : udpSocket = new DatagramSocket();
    How can I specify the IP address and port to use for my client???
    Thanks for your help.

    I must to specify from which interface (and port) all the requests are sent. You don't have to specify the interface unless your static unicast routing tables are incorrect, and you never have to specify the port unless some lunatic is in control of your firewall.

  • Where is the server address and port stored that is configured in NI License Manager?

    Hi,
      I am trying to configure a silent installation of LabView.  I have tried the specfile and put in the license code etc..  I cannot see a place there to configure a license server address.
    I've run NI License Manager on a reference PC and have configured one there but how can I deploy that config to a number of PCs?  How is it stored and where is it stored?
    thanks
    Paul

    Last question (I promise)
    If I dont have a volume license how do I determine what my 'package' or 'family' is?
    Package
    Syntax: nilmUtil.exe -activate "packagename version"
    Example: nilmUtil.exe -activate "LabVIEW_PDSM_PKG 8.0500" 
    Family
    Syntax: nilmUtil.exe -family "family"
    Example: nilmUtil.exe -family "LabVIEW_ADE_080600" 

  • Passing DNS server addresses through DHCP?

    I'm setting up NAT & DHCP (both as a DHCP client & DHCP server) on a 2621. Since the DNS server address(es) are received on the router's interface configured as a DHCP client, is there a way to pass these (possibly dynamic) address(es) on the internal network clients? What I see in the DHCP server functionality is that the option specifying what DNS server(s) are passed on to clients is hard coded. If hard coding the option is my only choice, do I have any guarantee that the ISP will always use the same IP address(es) for its DNS servers?
    Any insight would be appreciated.

    Thats exactly what the 'import all' command is for.
    In your DHCP server, if you supply the command 'import all', it will seek the DHCP information that was given to it on the interface that has "ip address dhcp". It will store the information like DNS into your DHCP server, and then send that out to all devices receiving DHCP addresses from your server.

  • How to change my Email address and my home address ?

    Hi,
    I Create a new account @live.com  , I want all my last  certifications to be use the new Email address instead of the old one
    and also how to change my home address
    Last Questions , I want to change my login account on this forums to  use the new one so i keep with all my questions and my points  in the new login
    Thanks.

    Hi.
    You can change your home address at the Microsoft Profile Center. You will need to log in with one of your Live ID accounts and change here it here:
    https://profile.microsoft.com/regsysprofilecenter/infodefault.aspx
    As Sathya suggested, you can contact the Microsoft Certified Professional Support staff to move your certifications from the old email address to the new one, here:
    MCP support contact information
    Telephone: (800) 636-7544
    Monday through Friday: 6:30 A.M.–5:30 P.M. Pacific Time
    Email: [email protected]
    Expect a response within two business days.
    Fax: (661) 793-6555
    Alternately, you can contact your Microsoft Regional Service Center for Microsoft Learning. Please use the following web page to find the contact information for help.
    http://www.microsoft.com/learning/en-us/help.aspx
    The page includes email and phone contact information for your geographic location so you can email or call them directly. They will help you get your MCP ID transferred to your new Live ID email account.
    NOTE: This public forum is usually monitored by fellow certified IT folks and trainers.
    Good luck!
    Best wishes, Davin Mickelson

  • How to resize the menu,address and bookmark toolbars. Not the font but the toolbar sizes

    I'm trying to reduce the overall space of the top of the firefox page.
    I have the menu and the the bookmarks tool bars checked and between those 2 and the address and site header it takes up way to much real estate.
    My font size is good but the wasted area is way to much and I can't seem to find the simple answer to looking for addons and themes to just resize the height of the space.
    This is the new 33.1 and up to this point all custom has been a breeze.
    Thanks much.

    Hello,
    Have you considered running Firefox in [[How to make Firefox and websites go full screen|Full Screen mode]]? There is also an extension that hides the toolbars until you hover your mouse over the top of the screen:
    * https://addons.mozilla.org/en-US/firefox/addon/fullscreen-toolbar-hover/
    You can change the size of your toolbars by using the userChrome.css file, or by installing [https://addons.mozilla.org/en-US/firefox/addon/stylish/ Stylish] and using one of these styles:
    * https://userstyles.org/styles/9349/navigation-location-bar-minimal-height
    * https://userstyles.org/styles/9350/menu-and-searchbar-minimal-height-dm
    * You can edit the code of the style to suit your needs better. I don't know how it will affect the current interface, so if you find that Firefox becomes unusable after using this style, load Firefox in [[Troubleshoot Firefox issues using Safe Mode|Safe Mode]] and uninstall Stylish to remove it
    ** Alternatively, if the address bar still works, type in '''about:addons''' in your address bar, and go to the User Styles tab, then disable/remove the style
    For more information on userChrome.css:
    * http://kb.mozillazine.org/index.php?title=UserChrome.css

Maybe you are looking for