Collecting a Password

Hi all,
I would like to collect a users password via a form displayed in the SAP Business One user interface for connecting to additional SAP Business One companies.
The add-on needs to run against 2007A versions of SAP Business One which doesn't seem to provide a simple way via object properties to mask input with an *. 
I've tried looking for an ActiveX control to use but have not been able to find one that supports a text box.
I would appreciate any pointers or ideas on the best way of tackling this.
Regards,
Sean

In 8.8 a password edittext was introduced that does this for you, but if you are on a lower version you may have to workaround it - obviously as Gordon says, this may defeat security, so wherever you store the password, make sure you encrypt it somehow. You can find lots of encryption solutions around with a google search.
The workaround could go like this:
Catch the key pressed event on the text box; before_action=true
Store the key pressed into a string
Set bubble event = false
write a "*" to the field
This will repeat until the user finished typing their password and you will end up with a full string like "password" and a text box with "********" in it.
Then once the user clicks a button to signify they are finished, encrypt the string with whatever method you will use and store it (or use it immediately and dispose).
Big issue with this is you have no validation; so that can be done by attempting to create a DI connection using that user+the password they have just entered and see do you get an error message.
Best of luck

Similar Messages

  • Metric Collection Errors

    I am using a 10.2 OEM agent to monitor various database versions (8i,9i,10g). I understand that using a 10.2 agent on an 8i database is not supported.... from what I have seen, you must use a 10.1 OEM agent. However, we would like to upgrade our 8i databases and therefore do not want to lower our OEM agent version to accomodate something that will phase out soon. In the meantime, I am getting collection errors. Some I was able to fix since error message had perl line number in it.... I know this is unsupported, but hopefully Oracle could list it as a valid work-around. There are just a few messages left:
    Target MYDB
    Type Database Instance
    Metric Data Base parameter collection, Remote Password File, Remote OS Roles and Authentication, DB Password Setting
    Collection Timestamp May 18, 2007 6:02:57 AM
    Error Type Collection Failure
    Message ORA-00900: invalid SQL statement
    This was really 4 different metric error messages. Does anyone have suggestions of how to clear these error messages? I am fine with not collecting this info for our v8 databases. I was wondering if I could delete from sysman.MGMT_CURRENT_METRIC_ERRORS?
    Or if someone knows how to fix these last few errors, that would be even better.
    Thanks.

    No, all oracle8 dbs are at 8.1.7.4 (none at lower version).
    References:
    Metalink: WRONG SQL STATEMENTS IN ESAPRIVREPORTS.PL FOR 8.1.7.4 DATABASES (bug# 6130510)
    Forum: Metric Collection Errors
    Metalink: METRIC COLLECTION ERRORS AGAINST 8.1.7.4 DATABASES MONITORED BY GRID CONTROL (bug# 5921130)
    Steps I have taken:
    1. Used Note:373394.1 to grant appropriate privs
    2. modified perl scripts until collection errors were resolved.
    a) Ran the following statements on Oracle 8.1.7.4 database:
    alter system set "_new_connect_by_enabled" = TRUE;
    grant select on sysauth$ to dbsnmp;
    3. have a handful (5 or 6) of errors left with no perl filenames, line numbers, etc. I would like to figure out how to either suppress these or resolve them so that I don't have to manually filter through metric errors trying to determine which are valid and which are not.
    Thanks.

  • Web service Logon ticket

    Hi,
    Is there a way to generate a logon ticket in an EJB?
    I face the following problem: on server A(SAP ABAP) there is a web service, which I consume on server B(SAP Java AS) and create a REST, which is called from an UI5 application on server C(SAP Gateway).
    When I call the consumed service from server B via WSNavigator or EJB explorer its working. BUT when the service is called by the REST its throwing the following exception:
    Error while creating assertion ticket on demand. No logged in user found.
    Assertion ticket could not be retrieved. Error was No logged in user found.. [EXCEPTION] java.lang.IllegalStateException: No logged in user found. at com.sap.security.core.server.jaas.SAPLogonTicketHelper.createAssertionTicket(SAPLogonTicketHelper.java:496) at com.sap.security.core.server.jaas.AssertionTicketFactoryImpl.createAssertionTicket(AssertionTicketFactoryImpl.java:67) at com.sap.engine.services.wssec.srt.protocols.GetAssertionTicketPrivAction.run(GetAssertionTicketPrivAction.java:36) at com.sap.engine.services.wssec.srt.protocols.GetAssertionTicketPrivAction.run(GetAssertionTicketPrivAction.java:20) at java.security.AccessController.doPrivileged(Native Method)...
    I think it is working from WSNavigator/EJBExplorer because there I'm logged in and Logon Ticket is generated and sent to server A, but because server C communicate with server B via REST(jsonp ajax call), there is no generated Logon Ticket on server B.
    Is there a way to generate a Logon ticket or set credentials to the web service. I tried the following but its not working:
    ZCUUTLI0016BPMTYPEDOWNL test = downloadService.getZCUUTLI0016_BPM_TYPE_DOWNL();   
      Mapreq_ctx = ((BindingProvider)test).getRequestContext();
           Map> headers = new HashMap>();
    headers.put("Username", Collections.singletonList("user"));   
    headers.put("Password", Collections.singletonList("password"));
    req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
    Note: Other possible solutions are also welcome.
    Thanks,
    Ivan

    hi ivan,
    for your scenario - does the abap backend call require a real user or is a technical user sufficient? if only a technical user is required you can define one in the single service administration/ application communication configuration of your portal System.
    in order to use the logon ticket of your ajax call i think you need to configure/setup the correct sso - environment. checkout this link
    http://help.sap.com/saphelp_nw74/helpdata/en/7a/9ad1882c244de0a3a99c1e46095ab3/content.htm?frameset=/en/c4/81215150e92414e10000000a44176d/frameset.htm&current_toc=/en/ad/612bb3102e4f54a3019697fef65e5e/plain.htm&node_id=87
    regards,
    christian

  • PBE; final block not properly padded help!

    Hi there,
    I'm having problems decrypting passwords using password based encryption (PBE), throwing me a "final block not properly padded" exception.
    The passwords are also encrypted uses PBE in a seperate class called the PasswordEncryption. The code necessary to generate the Cipher is in a seperate method which is passed a String to determined if it would be initialized in "encrypt" or "decrypt" mode.
    The class where the passwords are decrypted, UserManager, is passed the encrypted passwords as a String. It calls the PasswordEncryption class gets getcipher() to get the Cipher, and then decrypts the password. The data is read from the database by another class which reads database info, and passed in as a string to the decrypting class. The decrypting class converts the string to a byte[].
    Below I have the UserManager class and PasswordEncryption class:
    public class UserManager
    implements SecurityServerInterface, PETComponent {
    public UserManager() {
    private static String decryptPassword(String asPassword) throws
    SecurityException {
    PasswordEncryption passwordEncryption = new PasswordEncryption();
    Cipher pbeCipher = passwordEncryption.getCipher("decrypt");
    String clearText = new String();
    byte[] encryptedPassword = asPassword.getBytes();
    try {
    //This is where decryption failed! Given final block not properly padded
    byte[] cipherText = pbeCipher.doFinal(encryptedPassword);
    System.out.println(cipherText);
    System.out.println("test cipher text");
    clearText = new String(cipherText);
    System.out.println("original:" + asPassword);
    System.out.println("decrypted:" + clearText);
    catch (IllegalBlockSizeException e) {
    System.out.println(e.getMessage());
    String illegalBlock = e.getMessage();
    throw new SecurityException(illegalBlock);
    catch (BadPaddingException e) {
    System.out.println(e.getMessage());
    String badPadding = e.getMessage();
    throw new SecurityException(badPadding);
    catch(Exception e) {
    System.out.println(e.getMessage());
    String exception = e.getMessage();
    throw new SecurityException(exception);
    System.out.println(clearText);
    return clearText;
    public class PasswordEncryption {
    public static void main(String[] args) throws PETDBException,
    SecurityEncryptionException {
    PasswordEncryption encryptor = new PasswordEncryption();
    ArrayList mainList = encryptor.getAllPasswords();
    mainList = encryptor.encryptAllPasswords(mainList);
    encryptor.updateAllPasswords(mainList);
    public PasswordEncryption() {
    //Get passwords from the user table of the database, e.g, loginName and passwords
    private ArrayList getAllPasswords() throws PETDBException {
    ArrayList passwordList = new ArrayList();
    DBConnection.setConnection("jdbc:mysql://localhost/Mysql/data/pet?user=root&password=");
    DBConnection dbCon = DBConnection.createConnection();
    Connection con = dbCon.getConnection();
    System.out.println(con);
    try {
    String allPasswordQuery = " SELECT " + DBColumns.USPASSWD.trim() + " , " +
    DBColumns.USLOGINNAME.trim() + " from " + DBColumns.USER;
    Statement stmt = con.createStatement();
    ResultSet rs;
    rs = stmt.executeQuery(allPasswordQuery);
    if (rs.isFirst()) {
    throw new PETDBException("No password found in the database.");
    while (rs.next()) {
    UserDO loUserDO = new UserDO();
    loUserDO.setPassword(rs.getString(DBColumns.USPASSWD));
    loUserDO.setLoginName(rs.getString(DBColumns.USLOGINNAME));
    passwordList.add(loUserDO);
    catch (SQLException sql) {
    String sqlError = sql.getMessage();
    throw new PETDBException(sqlError);
    return passwordList;
    private ArrayList encryptAllPasswords(ArrayList aoPasswordList) throws
    SecurityEncryptionException {
    // Encrypt the password
    Cipher pbeCipher = getCipher("encrypt");
    Iterator passwordIterator = aoPasswordList.iterator();
    UserDO loUserDO = new UserDO();
    try {
    while (passwordIterator.hasNext()) {
    loUserDO = (UserDO) passwordIterator.next();
    String lsPassword = loUserDO.getPassword();
    byte[] clearTextPassword = lsPassword.getBytes();
    byte[] cipherText = pbeCipher.doFinal(clearTextPassword);
    String cipherString = new String(cipherText);
    loUserDO.setPassword(cipherString);
    System.out.println(cipherString);
    catch (IllegalBlockSizeException e) {
    throw new SecurityException("Can't encrypt password, illegal block size");
    catch (BadPaddingException e) {
    throw new SecurityException("Can't encrypt password, bad padding");
    System.out.println(aoPasswordList);
    return aoPasswordList;
    public Cipher getCipher(String mode) {
    PBEKeySpec pbeKeySpec;
    PBEParameterSpec pbeParamSpec;
    SecretKeyFactory keyFac;
    // Salt
    byte[] salt = {
    (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
    (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
    // Iteration count
    int count = 20;
    // Create PBE parameter set & a SecretKey
    pbeParamSpec = new PBEParameterSpec(salt, count);
    SecretKey pbeKey;
    // Use our own encryption password.
    // Collect the password as char array and convert
    // it into a SecretKey object, using a PBE key
    // factory.
    char[] password = new String("cmuw-team5").toCharArray();
    pbeKeySpec = new PBEKeySpec(password);
    try {
    keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
    pbeKey = keyFac.generateSecret(pbeKeySpec);
    catch (NoSuchAlgorithmException e) {
    throw new SecurityException("Can't collect password as a char array");
    catch (InvalidKeySpecException e) {
    throw new SecurityException("Can't convert password into a SecretKey Object");
    // Create PBE Cipher
    Cipher pbeCipher;
    try {
    pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
    catch(NoSuchAlgorithmException e) {
    throw new SecurityException("Can't create a PBE Cipher, no such algorithm");
    catch(NoSuchPaddingException e) {
    throw new SecurityException("Can't create a PBE Cipher, no such padding");
    // Initialize PBE Cipher with key and parameters
    if (mode == "encrypt") {
    try {
    pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
    catch(InvalidKeyException e) {
    throw new SecurityException("Can't initialize PBE Cipher with key");
    catch(InvalidAlgorithmParameterException e) {
    throw new SecurityException("Can't initialize PBE Cipher with parameters");
    if (mode == "decrypt") {
    try {
    pbeCipher.init(Cipher.DECRYPT_MODE, pbeKey, pbeParamSpec);
    catch(InvalidKeyException e) {
    throw new SecurityException("Can't initialize PBE Cipher with key");
    catch(InvalidAlgorithmParameterException e) {
    throw new SecurityException("Can't initialize PBE Cipher with parameters");
    return pbeCipher;
    //Get encrypted passwords out of the ArrayList and update the database
    private void updateAllPasswords(ArrayList aoUpdatePasswordList) throws
    PETDBException {
    DataService dataService = new DataService();
    Iterator getEncryptPassword = aoUpdatePasswordList.iterator();
    String lsUpdatePassword = new String();
    String lsUserName = new String();
    Statement stmt;
    DBConnection dbCon = DBConnection.createConnection();
    Connection con = dbCon.getConnection();
    try {
    stmt = con.createStatement();
    System.out.println(stmt);
    catch (SQLException sql) {
    String sqlError = sql.getMessage();
    System.out.println(sqlError);
    throw new PETDBException(sqlError);
    while (getEncryptPassword.hasNext()) {
    UserDO loUser = (UserDO) getEncryptPassword.next();
    lsUpdatePassword = loUser.getPassword();
    lsUserName = loUser.getLoginName();
    String allUpdatePassword = " UPDATE " + DBColumns.USER + " SET " +
    DBColumns.USPASSWD + " = " + "'" + lsUpdatePassword + "'" + " WHERE "
    + DBColumns.USLOGINNAME + " = " + "'" + lsUserName + "'";
    System.out.println(allUpdatePassword);
    try {
    int returnValue = stmt.executeUpdate(allUpdatePassword);
    System.out.println(returnValue);
    catch (SQLException sql) {
    String sqlError = sql.getMessage();
    throw new PETDBException(sqlError);
    try {
    con.commit();
    con.close();
    catch (SQLException sql) {
    String sqlError = sql.getMessage();
    throw new PETDBException(sqlError);

    Thanks for the prompt response! I got this example
    from the Sun Java cryptography extensions web page at:
    http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/
    CERefGuide.html#PBEExThe code I'm pointing out did not come from there. Nowhere in Sun's examples do you see them creating Strings directly from ciphertext. (Which is good, because if you did, their examples wouldn't work). To give some more context on where the problem is:private ArrayList encryptAllPasswords(ArrayList aoPasswordList) throws SecurityEncryptionException {
      // Encrypt the password
      Cipher pbeCipher = getCipher("encrypt");
      Iterator passwordIterator = aoPasswordList.iterator();
      UserDO loUserDO = new UserDO();
      try {
        while (passwordIterator.hasNext()) {
          loUserDO = (UserDO) passwordIterator.next();
          String lsPassword = loUserDO.getPassword();
          byte[] clearTextPassword = lsPassword.getBytes();
          byte[] cipherText = pbeCipher.doFinal(clearTextPassword);
          // DOING THE FOLLOWING TO CIPHERTEXT TURNS IT INTO GARBAGE!
          String cipherString = new String(cipherText);
          loUserDO.setPassword(cipherString);
          System.out.println(cipherString);
      } catch (IllegalBlockSizeException e) {
        throw new SecurityException("Can't encrypt password, illegal block size");
      } catch (BadPaddingException e) {
        throw new SecurityException("Can't encrypt password, bad padding");
      System.out.println(aoPasswordList);
      return aoPasswordList;
    }(Note: Please use the [ code ] tags when you post code - it makes it MUCH easier to figure out what you're doing.)
    Also, my decryption code in the UserManager class does
    work for two out of 8 users....I can't really figure
    out why it's working for Only 2 users, and not the
    rests. It's possible that the ciphertext is successfully string-able in those two cases (although I doubt it). But I can absolutely guarantee to you that trying to treat ciphertext as a String will turn your ciphertext into grabage, and that will result in a BadPaddingException when you decrypt. You need to stop doing that.
    If you need to treat ciphertext or keys as Strings, the right way to do it is to Base64-encode the byte[] into a String, and then Base64-decode when you want to decrypt.
    Grant

  • NetInstall - Grey screen after logging in for user created during install

    I am creating a NetInstall of 10.8 for mass deployment in my workplace. I am currently having difficulty with a user account that was created by a script that runs in place of the Setup Assistant.
    I am trying to skip the Setup Assistant, and as such, the script touches the /var/db/.AppleSetupDone file (which doesn't exist at this point).
    This works, with the installation progressing straight on to the login screen where the user 'administrator' has been created, and is available for login.
    However, when the user logs in, they are presented with a grey screen & the mouse cursor. No dock, desktop, no finder menu bar.
    I am at a loss as to what is going wrong as this had worked perfectly fine in the developer preview.
    The script is as below: (certain sections have been removed for security purposes)
    Any pointers would be much appreciated.
    #!/bin/sh
    ############# SET VARIABLES ###################
    . /etc/rc.common
    #set primary network interface
    interface=`netstat -r -f inet | awk '/default/{print $6}' | head -1`
    #set server address for packages
    pkgserver='macimaging.blah.qld.edu.au'
    #Get default route's interface's ip address
    ip=`ifconfig $interface | grep "inet 10." | sed -e 's/^.*inet 10/10/' -e 's/ netmask.*$//'`
    #get version number of Mac OS X
    macversion=`sw_vers | awk '/^ProductVersion/{split($2, MINOR, "."); print MINOR[2]}'`
    ############# CHECK ADMIN PASSWORD ###################
    shadow=blah
    i=0
    # initialise variable
    passwd=""
    # if machine is set to automatically image
    if [ `nvram -p | grep -c reimage-key` -eq 1 ]; then
      # remove verbose boot arguments from nvram
      nvram -d boot-args
      # collect admin password
      passwd=`nvram reimage-key | awk '{print $2}' | openssl enc -aes-256-cbc -pass "pass:Aut0mat1cR31mag3" -a -d`
      # check it was successfully decrypted
      if [ $? -ne 0 ]; then
      osascript -e beep
      echo "Automatic imaging key failed. Press enter to continue."
      read
      passwd=""
      fi
      # remove key from nvram
      nvram -d reimage-key
    fi
    # if the admin password wasn't successfully collected
    if [ "$passwd" = "" ]; then
      #clear the screen
      clear
      say -v Victoria "Please enter the Administrator's password"
      while [ $i = 0 ]
      do
        echo "Please enter Administrator's password: (Note: Input is hidden)"
        #read password from stin but don't show
        stty_orig=`stty -g`
        stty -echo
        read passwd
        stty $stty_orig
        hash=`echo $passwd | shasum -a 512 | awk '{print $1}'`
        if [ $shadow = $hash ]; then
            #password is correct; continue with setup
            i=1
        else
            echo "Incorrect. Please try again"
        fi
      done
    fi
    #clear the screen
    clear
    echo "Log:"
    ############# SET EFI PASSWORD ###################
    echo "Setting EFI password"
    #to create a new EFI password, initially set it on a test machine with the GUI utility, then extract its value with: `nvram -p | awk '/security-password/{print $2}'`. Put that value in this command (also replacing our admin password) to generate hash for below: `echo "pass_from_nvram" | openssl enc -aes-256-cbc -pass "pass:ourcurrentadminpassword" -a`
    nvshadow=`echo "blah" | openssl enc -aes-256-cbc -pass "pass:$passwd" -a -d`
    nvram security-mode=command
    nvram security-password=$nvshadow
    #reset running variable for security
    nvshadow=""
    ############# GENERATE RC SHADOW FILE ###################
    #if you don't know how the following lines work, get a pillow ready for screaming into
    #the admin key (which is decrypted below) is used to decrypt publicly distributed packages to change the admin account's password (without having the password in the package in clear text)
    decypted_admin_private_key=`echo "blah" | openssl enc -aes-256-cbc -pass "pass:$passwd" -a -d`
    admin_private_key_hash=`echo "$decypted_admin_private_key" | shasum -a 512 | awk '{print $1}'`
    echo "$admin_private_key_hash $decypted_admin_private_key" >> /var/root/RC_admin_private_key
    chmod 600 /var/root/RC_admin_private_key
    #this keeps a record of the administrator password set on imaging
    RC_admin_pass_hash=`echo "$passwd" | shasum -a 512 | awk '{print $1}'`
    RC_admin_pass_encrypted=`echo "$passwd" | openssl enc -aes-256-cbc -pass "pass:$decypted_admin_private_key" -a`
    echo "$RC_admin_pass_hash $RC_admin_pass_encrypted" >> /var/root/RC_admin_shadow
    #a few security measures
    chmod 600 /var/root/RC_admin_shadow
    RC_admin_pass_encrypted=""
    decypted_admin_private_key=""
    ############# SETUP PARTITIONS ###################
    echo "Updating file system table to mount data partition on boot for user accounts"
    #Find if Home or Data partition exists (N.B. If Bootcamp is used the following awk commands need to be modified to only look for [Hh]ome and not [Dd]ata)
    partname=`diskutil list | awk '/([Hh]ome)|([Dd]ata)/{print $3}' | head -1`
    partdev=`diskutil list | awk '/([Hh]ome)|([Dd]ata)/{print $6}' | head -1`
    #If a Data partition exists
    if [ "$partdev" ]; then
         #Mount it on boot to /Users
         echo "LABEL=$partname      /Users   hfs     rw" > /etc/fstab
         #mount Data drive to /Users
         diskutil umount /dev/$partdev
         mount -t hfs /dev/$partdev /Users
    fi
    ############# CREATE ADMIN ACCOUNT ###################
    echo "Creating Administrator account"
    #create administrator account
    dscl . create /Users/administrator
    dscl . create /Users/administrator RealName "Administrator"
    dscl . create /Users/administrator PrimaryGroupID 20
    dscl . create /Users/administrator UniqueID 501
    dscl . create /Users/administrator NFSHomeDirectory /Users/administrator
    dscl . create /Users/administrator UserShell /bin/bash
    dscl . passwd /Users/administrator $passwd
    dscl . append /Groups/admin GroupMembership administrator
    dscl . append /Groups/_lpadmin GroupMembership administrator
    dscl . append /Groups/admin GroupMembership administrator
    dscl . create /Users/administrator picture "/Library/User Pictures/Sports/8ball.tif"
    dscl . delete /Users/administrator jpegphoto
    #reset running variable for security
    passwd=""
    ############# SET blah NETWORK LOCATION ###################
    echo "Setting up blah network location"
    networksetup -createlocation blah populate
    networksetup -switchtolocation blah
    echo ""
    ############# SET HOSTNAME ###################
    sleep 10
    dhcphostname=`host $ip | sed -e 's/^.* domain name pointer //' -e 's/\..*blah.*$//' -e 's/-wstudent$//' -e 's/-wstaff$//'`
    #while [ $? -ne 0 ]
    #do
    # sleep 5
    # dhcphostname=`host $ip | sed -e 's/^.* domain name pointer //' -e 's/\..*blah.*$//' -e 's/-wstudent$//' -e 's/-wstaff$//'`
    #done
    echo "Setting host name"
    #set host name from dhcp
    scutil --set HostName "$dhcphostname"
    scutil --set LocalHostName "$dhcphostname"
    systemsetup -setcomputername "$dhcphostname"
    ############# SET TIME ###################
    echo "Setting time zone"
    #set time zone
    systemsetup -settimezone Australia/Brisbane
    #set system's locale
    echo "Setting system's locale"
    defaults write "Apple Global Domain" AppleLocale "en_AU"
    echo "Syncing with time server"
    #sync time with local time server
    ntpdate ntp.blah.qld.edu.au
    ############# INSTALL FTP CLIENT ###################
    echo "Downloading and installing ftp client"
    curl -O ftp://$pkgserver/install/ncftp.tar.gz
    tar -xzf ncftp.tar.gz -C /usr/bin/
    rm ncftp.tar.gz
    ############# INSTALL POLICY MANAGER AND UPDATE POLICY ###################
    echo "Downloading and installing Policy Manager"
    #download and install policy manager
    echo 'get -R "pool/Policy Manager.pkg"' | ncftp $pkgserver; installer -verbose -target / -pkg "Policy Manager.pkg"
    rm -R "Policy Manager.pkg"
    echo "Downloading and installing Update Policy"
    #download and install update policy
    echo 'get -R "pool/Update Policy.pkg"' | ncftp $pkgserver; installer -verbose -target / -pkg "Update Policy.pkg"
    rm -R "Update Policy.pkg"
    ############# INSTALL MAC UPDATE COMBO ###################
    echo "Downloading and installing most recent Mac update combo package"
    #download and install the most recent combo update
    echo "get -R pool/MacOSXUpdCombo10.$macversion.Latest.pkg" | ncftp $pkgserver
    chmod -R u+x MacOSXUpdCombo10.$macversion.Latest.pkg
    installer -verbose -target / -pkg MacOSXUpdCombo10.$macversion.Latest.pkg
    rm -R MacOSXUpdCombo10.$macversion.Latest.pkg
    ############# INSTALL ADDITIONAL PACKAGES ###################
    echo "Downloading and installing additional post install packages"
    mkdir postinstall
    cd postinstall
    echo "get -R postinstall/common/*" | ncftp $pkgserver
    echo "get -R postinstall/10.$macversion/*" | ncftp $pkgserver
    chmod -R u+x *
    # save and change IFS
    OLDIFS=$IFS
    IFS=$'\n'
    # read all file names into an array
    fileArray=($(ls))
    # restore it
    IFS=$OLDIFS
    # get length of the array
    tLen=${#fileArray[@]}
    #install each package
    for (( i=0; i<${tLen}; i++ )); do
        installer -verbose -target / -pkg "${fileArray[$i]}"
    done
    cd ..
    rm -R postinstall
    ############# FINISH SETUP ASSISTANT ###################
    #load Policy Manager LaunchDaemon to run on boot
    launchctl load /Library/LaunchDaemons/au.edu.qld.blah.policymanager.plist
    #give time for policy to load
    sleep 2
    #set flag so OS X knows not to run Setup Assistant on next boot
    echo "<?xml version="1.0" encoding="UTF-8"?>\n<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n<plist version="1.0">\n<dict>\n <key>Address</key>\n <dict>\n <key>CountryName</key>\n <string>Australia</string>\n </dict>\n</dict>\n</plist>" > /var/db/.AppleSetupDone
    #set flag so blah Updater knows this machine's just been imaged
    echo "setup done" > /var/root/blahSetupDone
    #remove self
    rm /var/root/setup.sh
    echo "\nI will now reboot; please wait"
    say -v Victoria "I will now reboot; please wait"
    reboot

    mattn wrote:
    (1) You cannot run the installer program while booted into your primary partition; you must boot into the DVD. Restart the computer while holding down the C key until the DVD boots.
    This isn't true. The retail Snow Leopard DVD is designed to start the install procedure while started up normally. When you do this, after performing some checks on the target partition it writes some pre-install files to it before restarting automatically from the DVD. This speeds up the install procedure.
    (2) You cannot install Snow Leopard on this computer from a DVD that came with another computer; you must use, as it were, a free-standing commercial Snow Leopard installer DVD.
    The exception is, as Xian Rinpoche correctly surmised, a Mac model released after the currently available retail Snow Leopard DVD became available. The newest Macs require a later version of the OS than what is included on the retail DVD, which is why it won't work with the new i5 & i7 models. (See Don't install a version of Mac OS X earlier than that which came with your Mac for more about this.)
    As a general rule, use either the installer that came with the Mac on its grey system discs or a retail disc released after that Mac model was released. You can also refer to this handy chart of the OS version that ships with each Mac model.

  • How to add a Soap header to a Java client

    Hello,
    I am new in Web Services.I am struggling to set Header using Although is has been added through handler. But My requirement is to add Header at client side not from server side. Following test code is being used to set at header despite it is not working .
    Map<String, Object> req_ctx = ((BindingProvider)c).getRequestContext();
         req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:7001/CalculatorWS/CalculatorProgram?wsdl");
         Map<String, List<String>> headers = new HashMap<String, List<String>>();
         headers.put("Username", Collections.singletonList("mkyong"));
         headers.put("Password", Collections.singletonList("password"));
         req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);
    Please help me to solve this problem.

    Many thanks to reply.
    It had been done by handler.Handler is deploy at server side,In contrast we need to set handler from client side. with the help of google i found piece of code, follow as below.But it is not working for me.
    Need help am i missing something in this code Or what do i use different approach ?
    Map<String, Object> req_ctx = ((BindingProvider)c).getRequestContext();
    req_ctx.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "http://localhost:7001/CalculatorWS/CalculatorProgram?wsdl");
    Map<String, List<String>> headers = new HashMap<String, List<String>>();
    headers.put("Username", Collections.singletonList("mkyong"));
    headers.put("Password", Collections.singletonList("password"));
    req_ctx.put(MessageContext.HTTP_REQUEST_HEADERS, headers);

  • How to encrypt with a string as input,but not a key object

    As far as I know,when encrypt or decrypt ,a key must first be got,and the key is first generate by a tool or from SecurityRandom,that means I can not generate the same key with the same input.Does there is a method which can generate a same with the same input string?
    There is a need to transfer file between to site,and the customer wish to encrypt these files during transfering,and they want to store a string into each database at each site,when sending and receiving files,get the string from the database to encrypt or decrypt the file,they alse want to have a control of the string,they can change the string randomly if they wish as long as long keep each string is equal,how to realize this?

    I think what you are looking for is a password based encryption (PBE). An example of using the same is mentioned in JCE reference guide. Below is the relevant code/docs from the rference guide.
    Using Password-Based Encryption
    In this example, we prompt the user for a password from which we derive an encryption key.
    It would seem logical to collect and store the password in an object of type java.lang.String. However, here's the caveat: Objects of type String are immutable, i.e., there are no methods defined that allow you to change (overwrite) or zero out the contents of a String after usage. This feature makes String objects unsuitable for storing security sensitive information such as user passwords. You should always collect and store security sensitive information in a char array instead.
    For that reason, the javax.crypto.spec.PBEKeySpec class takes (and returns) a password as a char array.
    The following method is an example of how to collect a user password as a char array:
         * Reads user password from given input stream.
        public char[] readPasswd(InputStream in) throws IOException {
            char[] lineBuffer;
            char[] buf;
            int i;
            buf = lineBuffer = new char[128];
            int room = buf.length;
            int offset = 0;
            int c;
    loop:   while (true) {
                switch (c = in.read()) {
                  case -1:
                  case '\n':
                    break loop;
                  case '\r':
                    int c2 = in.read();
                    if ((c2 != '\n') && (c2 != -1)) {
                        if (!(in instanceof PushbackInputStream)) {
                            in = new PushbackInputStream(in);
                        ((PushbackInputStream)in).unread(c2);
                    } else
                        break loop;
                  default:
                    if (--room < 0) {
                        buf = new char[offset + 128];
                        room = buf.length - offset - 1;
                        System.arraycopy(lineBuffer, 0, buf, 0, offset);
                        Arrays.fill(lineBuffer, ' ');
                        lineBuffer = buf;
                    buf[offset++] = (char) c;
                    break;
            if (offset == 0) {
                return null;
            char[] ret = new char[offset];
            System.arraycopy(buf, 0, ret, 0, offset);
            Arrays.fill(buf, ' ');
            return ret;
        }In order to use Password-Based Encryption (PBE) as defined in PKCS #5, we have to specify a salt and an iteration count. The same salt and iteration count that are used for encryption must be used for decryption:
        PBEKeySpec pbeKeySpec;
        PBEParameterSpec pbeParamSpec;
        SecretKeyFactory keyFac;
        // Salt
        byte[] salt = {
            (byte)0xc7, (byte)0x73, (byte)0x21, (byte)0x8c,
            (byte)0x7e, (byte)0xc8, (byte)0xee, (byte)0x99
        // Iteration count
        int count = 20;
        // Create PBE parameter set
        pbeParamSpec = new PBEParameterSpec(salt, count);
        // Prompt user for encryption password.
        // Collect user password as char array (using the
        // "readPasswd" method from above), and convert
        // it into a SecretKey object, using a PBE key
        // factory.
        System.out.print("Enter encryption password:  ");
        System.out.flush();
        pbeKeySpec = new PBEKeySpec(readPasswd(System.in));
        keyFac = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
        SecretKey pbeKey = keyFac.generateSecret(pbeKeySpec);
        // Create PBE Cipher
        Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
        // Initialize PBE Cipher with key and parameters
        pbeCipher.init(Cipher.ENCRYPT_MODE, pbeKey, pbeParamSpec);
        // Our cleartext
        byte[] cleartext = "This is another example".getBytes();
        // Encrypt the cleartext
        byte[] ciphertext = pbeCipher.doFinal(cleartext);Hope this helps
    Sai Pullabhotla

  • Relogin into the application once the authentication fails

    Hi,
    We are using java web start to start our application. As we are refering to a secured resource in the weblogic environment we gets a JWS authentication popup screen.
    If we supply an invalid user/password combination the authentication fails and we have to restart the application.
    We thougt of putting the piece of code which does the authentication in a while(true) loop but it seems that the JWS uses the old user name and password next time also and so the application goes into an infinete loop.
    Answer to any of these two queries can solve our problem:
    1. Is there a way by which we can make the authentication dialog box to popup again in case of failure so that we don't have to restart the application.
    2. Is there any way by which we can clear the past values of user name and password from JWS authentication Dialog box. I guess in this way JWS will pop the Authentication Dialog again..
    Pl. reply to these at the earliest as our project is in critical state...
    thanx in advance
    Shashi

    Here's something we did. Not perfect, but it seems to be working. At least until the API provides better support!
    We worked to "preempt" the built-in authentication dialog. By that I mean we displayed our own dialog when the client application started (just a dialog, not an extension to java.net.Authenticator). Then for each and every URLConnection, we attach the "Authorization" request header. In our case, we're using Apache's Tomcat application server, so we grabbed their implementation of Base64 encoding (see org.apache.catalina.util.Base64.encode). So we collected username/password information from the user via our own dialog, used Catalina's base64 encoding method, and attached the "Authorization" request header for each and every URLConnection request. This prevents the Java Web Start default Authenticator from ever coming into play.
    One other problem (and our solution). If the user typed an invalid username/password, the server challenged our request (with the built-in Authenticator). To get around this issue, we created an unprotected servlet that accepted the specified username/password (via an HTTP tunnel) and returned a boolean (again, via tunneling). This servlet, while unprotected, was directed (in web.xml) to use SSL for security of the password. It validated the specified username/password. Our own authentication dialog worked with this servlet to give the user some specified number of chances to specify a valid username/password. Only if this servlet returned TRUE would the application continue, and make further URLConnection connections using the now-validated username/password.
    As I said earlier - this is NOT an optimal solution. What we really need is some API help from the Java Web Start team (they did say they looked at this board when we met at this year's JavaOne). The "correct" solution would be to have the Java Web Start default Authenticator act more like the authentication dialog box of any web browser, popping back up if an invalid username/password was specified.
    Anyways, I hope this helped. Good luck!

  • EE 4G server web redirects on ios8.4 iPad Air iphone5s With JavaScript enable.

    Ive been having problems when JavaScript is enabled and connected to the web with 4g, the EE's server is redirecting me to other web addresses when I want to look at an image hosted at postimage.org. I thought this was an apple JavaScript problem, but it only happens when connected via 4G and not through wifi, so I don't think its the apple JavaScript that's the main problem but the way EEs 4g web server handles JavaScript requests. This problem is starting to bug me having to switch JavaScript on and off, plus I don't know what other things maybe happening in the background like compromising data security or collecting my passwords.  Having paid for lots of data allowance with 4G may not now be worth it. 

    I can only think that someone who works for either apple EE or postimage has looked into it and sorted it out at there end. So whoever it was thanks. Just goes to show posting stuff up sometimes gets results even with no replays.  

  • [Request]Tomboy, Gpass, Gparted and Gnome PPP

    4 little applications can add our funs and efficiency.
    Tomboy:
    Tomboy is a desktop note-taking application for Linux and Unix. Simple and easy to use, but with potential to help you organize the ideas and information you deal with every day.
    Homepage:http://www.beatniksoftware.com/tomboy
    Gpass:
    The GNOME Password Manager - GPass for short - is a simple application, written for the GNOME 2 desktop, that lets you manage a collection of passwords. The password collection is stored in an encrypted file, protected by a master-password.
    Homepage:http://gpass.sourceforge.net/
    Gparted:
    GParted is a graphical frontend to libparted. Among other features it supports creating, resizing, moving and copying of partitions.
    Homepage:http://gparted.sourceforge.net/
    Gnome PPP
    GNOME PPP is a modem dialup tool designed to integrate nicely into GNOME 2 Desktop Environment. It is very similar to GPPP dialup utility created for GNOME 1 and KDE equivalent, KPPP. Since it is a graphical frontend for the excellent WvDial too, very little knowledge is needed to setup a dialup connection using GNOME PPP. It features ease of use, HIG dialogs, auto detection of your modem and connection monitoring. It is distributed under GPL, version 2, so you can download it and use it for free (free as in freedom, not as in free beer:)
    homepage:http://www.gnome-ppp.org/
    I really appreciate.

    I have made PKGBUILD for gparted and gnome-ppp:
    # Contributor: Eric Belanger <[email protected]>
    pkgname=gparted
    pkgver=0.0.5
    pkgrel=1
    pkgdesc="GParted is a graphical frontend to libparted. It supports creating, resizing, moving and copying of partitions."
    url="http://gparted.sourceforge.net/"
    license="GPL"
    depends=('parted' 'gtkmm' 'perlxml')
    source=(http://dl.sourceforge.net/sourceforge/gparted/$pkgname-$pkgver.tar.bz2)
    md5sums=('b222b9213ad912dd84741df6b7075693')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    rm install-sh depcomp
    ln -s /usr/share/automake-1.9/install-sh install-sh
    ln -s /usr/share/automake-1.9/depcomp depcomp
    ./configure --prefix=/usr
    make || return 1
    make prefix=$startdir/pkg/usr install
    # Contributor: Eric Belanger <[email protected]>
    pkgname=gnome-ppp
    pkgver=0.3.16
    pkgrel=1
    pkgdesc="A GNOME 2 WvDial frontend"
    url="http://www.gnome-ppp.org/"
    license="GPL"
    depends=('libgnomeui' 'x-server' 'wvdial')
    source=(http://www.gnome-ppp.org/download/0.3/$pkgname-$pkgver.tar.gz)
    md5sums=('3d03cd1d1e30577b67eb0153ab3bfb11')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --prefix=/opt/gnome
    make || return 1
    make prefix=$startdir/pkg/opt/gnome gnome_ppp_iconsdir=$startdir/pkg/opt/gnome/share/icons/hicolor/48x48/apps gnome_ppp_glade_filedir=$startdir/pkg/opt/gnome/share/gnome-ppp/glade install

  • Trying to use Variables with the Unknown Computer collection to prompt Task Sequence for Domain, Join Account, Join Password, and Join Location.

    I want to use SCCM 2012 R2 and OSD, to boot a bare metal machine, install and OS, and bind it to Active Directory. The catch is that I want the deployment process in SCCM to prompt for the following pieces of information, and then use that information to
    bind the computer to Active Directory (W/O using MDT) instead of supply the data in the task sequence.
    Computer Name
    Domain
    Domain OU
    Domain Join Account
    I am approaching this in a similar fashion as stated in this blog.
    http://osdblog.com/2013/06/26/add-a-prompt-for-a-computer-name-in-your-sccm-deployment/
    I have added the following collection variables to the unknown computers collection:
    When I launch the task sequence, I am prompted as I would expect. I input the desired information, the deployment competes, but it does not bind to the domain.  Here is what my TS looks like. I intentally disabbled  the apply Network Settings step
    because it forces you to enter specific information if it enabled. I don't want to that, thus why I am trying to use the variables.
    My SMSTS log does not have a whole lot of meaningfull data, but I can post it if someone wants to see it. The only possible thing I could think of would be drivers, their are some driver errors in the log. However, if I turn on the Apply Networking setting
    process in the task sequence and turn off the variables, the machines bind fine. With that in mind, I would not think my problem would be driver related. Anyone out there have expertise in using a process like this, that could assist?
    --Tony

    Awesome! Thanks. One more thing, how should I supply the OSDJoinPassword variable? Should I just enter %OSDJoinPassword%
    for Password and Confirm Password? I can not tell if it will actually read it as a variable or try to use "%OSDJoinPassword%" for
    the actual password.
    --Tony

  • Is someone trying to collect passwords

    I accidently typed 198.162.1.1 instead of 192.168.1.1.  In the past, I think I would just get an error message advising me that the address doesn't exist.
    Tonight, a similar log-in screen popped up.  I typed admin + my password and of course nothing happened.  I then realized that I had typed the wrong IP address.  After this I typed 192.168.1.1, but the same "fake" log-in screen popped up.
    I went to a different PC that was not infected and changed my password right away.
    Anyone else experience this?  Is it a real threat or just some nuisance?

    Well it may be someone collecting passwords. But then it could as well be just a normal networking device. If you have a public IP address range the router interface will be accessible from the internet unless you close it down. The .1.1 is a favorite address for routers in many subnets...
    If you are worried contact the East Kootenay Community College which owns the IP address.
    Enter the IP address at http://www.arin.net/whois/ and it shows you the contact information for the IP address.

  • My wife got a Iphone in Bangladesh. she do not know the password for apple ID, there is no way to collect it, as the email id for that iphone is not her. how she can use application store and itunes? please help me

    My wife got a Iphone in Bangladesh. she do not know the password for apple ID, there is no way to collect it, as the email id for that iphone is not her. how she can use application store and itunes? please help me

    If it is second hand, try putting it in recovery mode, and restoring it with itunes on a mac or pc.
    Recovery mode tutoral:http://www.youtube.com/watch?v=dkVr5CxFiFM

  • Which ids and passwords does HP Connected collect?

    HP Connected terms and conditions indicates they will collect ids and passwords from the attached computers.  Which ones are they talking about?  All of them?!!!

    Hi skyscooter,
    Welcome back to the HP Support forums.  I understand that you have been upgraded to HP Connected from HP's ePrintCenter. 
    I've included the What is HP Connected? document for your reference.  I've also included the Migrating from HP ePrintCenter to HP Connected FAQs document.  When your ePrintCenter was upgraded your printer should have migrated over.  You need to click on the 'Devices' tab in your HP Connected account and you should see your printer listed. I’ve also included the Learn About Devices in HP Connected which shows you which settings are available.
    You should still be able to see your eFax settings from the front panel of the printer.  I've included the Getting Started with eFax document for your reference.
    Regards,
    Happytohelp01
    Please click on the Thumbs Up on the right to say “Thanks” for helping!
    Please click “Accept as Solution ” on the post that solves your issue to help others find the solution.
    I work on behalf of HP

  • My wife collected my online ordered iphone 6 when i was away and she entered a wrong email address as the Apple ID .How can i change it now since the IClould pops up asking for password and i can't provide it so could not even delet it .Helps !

    A wrong email address was entered at the setting up of the new iphone 6 and how can I change it ?

    The problem is she entered an email address she thought might be mine ,but actually used by someone else .She said no password was set up .My understanding is an email must have been sent to that address and he or she can set up the password and download .And now I set up an new ID under the ICloud but still the wrong email address still appear as a default one .I tried to delete the set up but I was asked for the password which we don't have .
    Any good idea ?

Maybe you are looking for

  • Item Code Field size

    Hi! Is there a way to increase the Item Code field size? I believe it is 20 characters. Can it be increased to a higher size, say, 35 characters? Prajwal

  • How do I remove the info on home page

    Please help how do I remove the messages from my home page as they are so annoying

  • RE: (forte-users) Terminal Services - Win 2000

    Hi l've already installed my application 'appA' at my server 'ServerA'. When l try to execute this application in my pc thru Terminal Server, there were nothing displayed at my pc but when l check at on 'ServerA' , l can see that 'appA' is running ov

  • PDF exporting issues

    Last night I was able to export pdf's fine, but this morning not so much. I go to export them, and I can see in the background tasks that it is doing so. I check finder and can see the file being made (at 0 bytes), and once the background task finish

  • Transfer photo to iphone

    i having problem , how to transfer photo from my mac book (iphoto) to iphone ? anyone can advice me how to transfer the photo. thank