1 2 Previous Next 15 Replies Latest reply on Apr 21, 2015 12:32 PM by Ali SIMON

    BSA 86 SP1 Issue with nsh/blcred

    Ali SIMON

      Hello,

       

      after the upgrade to 8.6.01 (SP1) i encounter what seems like to be a permission issue with my $HOME when executing blcred command.

       

      Login to AS :

      execute NSH

      execte blcred -> issue.

       

      The same thing used to work before upgrade :

       

      asimon@xxxxxx:~> nsh

      [asimon@xxxxxx]% blcred cred -acquire -profile defaultProfile -i $HOME/.bladelogic/.user/user_info.dat

      2015-04-21 15:04:15,186  WARN [main] (BlLogger.java:152) - Failed to set permissions on BladeLogic user home dir.2

      Created BladeLogic user's home dir : //xxxxxx/users/asimon/.bladelogic

      2015-04-21 15:04:15,405  WARN [main] (BlLogger.java:152) - Failed to set permissions on BladeLogic user home dir.2

      Created BladeLogic user's home dir : //xxxxxx/users/asimon/.bladelogic

      Cannot obtain user credential: /xxxxxx/users/asimon/.bladelogic/config.properties (No such file or directory)

      On the AS, i am mapped as bladmin

      Agentinfo :

      [asimon@xxxxxx]% agentinfo

      xxxxxx:

        Agent Release   : 8.6.01.66

        Hostname        : xxxxxx

        Operating System: Linux 3.0.101-0.46-default

        User Permissions: 11001/10101 (bladmin/bladmin)

        Security        : Protocol=5, Encryption=TLS1

        Host ID         : 800B33F0

        # of Processors : 2

        License Status  : Licensed for NSH/CM

       

       

      Any suggestion would really be helpful.

       

      Thanks

      Ali

        • 1. Re: BSA 86 Issue with nsh/blcred
          Bill Robinson

          Open a support ticket.  also – it shouldn’t be using a nsh path for a os user’s home dir…

          • 2. Re: BSA 86 SP1 Issue with nsh/blcred
            Ali SIMON

            Hi Bill,

             

            you mean that the blcred command should not use NSH UNC path and that's a defect, or I have something not correctly setup ?

             

            Thanks

            • 3. Re: BSA 86 SP1 Issue with nsh/blcred
              Bill Robinson

              I’m not sure why it’s saying the home dir for the user is a nsh path.  that doesn’t seem correct.  the user’s home dir is not a nsh path right ?

              • 4. Re: BSA 86 SP1 Issue with nsh/blcred
                Ali SIMON

                From the OS point of view, this is my homedir : /users/asimon/


                from NSH point of view, my homedir is //xxxxxx/users/asimon/


                xxxx being the application server which i'm logged on.


                see :

                asimon@lx.....:~> pwd

                /users/asimon

                asimon@lx......:~> ls -al .bladelogic/

                total 40

                drwx------  3 asimon unixadm 4096 Apr 21 14:24 .

                drwxr-xr-x 11 asimon unixadm 4096 Apr 21 14:42 ..

                -rw-r--r--  1 asimon unixadm 5520 Apr 21 16:00 blcli.log

                .....

                .....

                asimon@lx.....:~> nsh

                [asimon@lx....]% ls -al //lx...../users/asimon/.bladelogic

                ls: Unable to access directory //lx...../users/asimon/.bladelogic: Permission denied

                total 0

                • 5. Re: BSA 86 SP1 Issue with nsh/blcred
                  Rajeev Gupta

                  Do you have the root persmissions on the server?

                  when you acquire credentials, this goes in your home directory/.bladelogic/blsecc

                  make sure you have access to this particular directory.

                  • 6. Re: BSA 86 SP1 Issue with nsh/blcred
                    Rajeev Gupta

                    try this.. when you login to your Putty, the place where this lands is your home. Now cd to the NSH install location and cd to bin

                    now, do

                    ./blcred cred -acquire -profile defaultProfile -username <yourUserName> -password <password>

                    then,

                    ./blcred cred -list

                    • 7. Re: BSA 86 SP1 Issue with nsh/blcred
                      Bill Robinson

                      Right – but $HOME doesn’t change to include the server path.  and for you to access the directory via the agent there needs to be a mapping in place.

                      • 8. Re: BSA 86 SP1 Issue with nsh/blcred
                        Rajeev Gupta

                        Oh yes, the agent is mapped to the root, so technically, you should have the root permission or Sudo root or Root itself to login to acquire the credentials.

                        Or probably, if this is mapped to someone else, you need to login as that user..

                        • 9. Re: BSA 86 SP1 Issue with nsh/blcred
                          Rajeev Gupta

                          The session credentials are probably into /root/.bladelogic/blsecc

                          • 10. Re: BSA 86 SP1 Issue with nsh/blcred
                            Bill Robinson

                            rajeev - i think you are entirely incorrect.

                             

                            asimon@xxxxxx:~> nsh

                            [asimon@xxxxxx]% blcred cred -acquire -profile defaultProfile -i $HOME/.bladelogic/.user/user_info.dat

                            --> at this point he's 'asimon', not root.  his home dir should be /users/asimon, and he did start nsh.  starting nsh doesn't mean you automatically cd into anything.  $HOME should still be /users/asimon.

                             

                            2015-04-21 15:04:15,186  WARN [main] (BlLogger.java:152) - Failed to set permissions on BladeLogic user home dir.2

                            Created BladeLogic user's home dir : //xxxxxx/users/asimon/.bladelogic

                            --> here is what doesn't make sense.  $HOME should be /users/asimon, not //xxx/users/asimon.  even if you cd over to another system $HOME won't change - eg:

                            prime% echo $HOME

                            /home/bill

                            prime% cd //blapp85-red6x64

                            blapp85-red6x64% echo $HOME

                            /home/bill

                             

                            i started nsh and $HOME is a local path.  cd'd to another system doesn't change that.

                             

                            ali - when you start nsh can you echo $HOME - where does that point to ?  do you have a .nshrc in your home dir - if so what is in it?
                            • 11. Re: BSA 86 SP1 Issue with nsh/blcred
                              Ali SIMON

                              I found the culprit.

                               

                              SHELL (bash)

                              asimon@lx1217:~> echo $HOME

                              /users/asimon

                               

                              NSH :

                              asimon@lx1217:~> nsh

                              [asimon@lx1217]% echo $HOME

                              //lx1217.ehc.adp.com/users/asimon

                               

                              This come from the '.nshrc' file I think (but that always worked before the upgrade)

                              [asimon@lx1217]% cat /etc/skel/.nshrc

                              # /etc/skel/.nshrc

                              . /etc/homeshell

                              PATH=/ehc/fs2/nsh/ADPscripts:$PATH:$HOME_SHELL2/nsh

                              PS1="[%n@%m]%# "

                              HOME=//lx1217.ehc.adp.com$HOME

                              export HOME PATH LD_LIBRARY_PATH

                              if I unload the NSHRC it works as $HOME is now correct.

                               

                              But anyway there must have been a change in the way it works, cause it worked with the previous version :-P

                              • 12. Re: BSA 86 SP1 Issue with nsh/blcred
                                Bill Robinson

                                Ok, you need to change your .nshrc to not reset $HOME.

                                • 13. Re: BSA 86 SP1 Issue with nsh/blcred
                                  Ali SIMON

                                  yes I have modified the .nshrc to not reset the $HOME

                                   

                                  What really make me wonder is why it used to work. I think we had this configured this way, because when we "cd" from a remote server, it wasn't going back to the correct source/home dir.

                                  But, this was with 8.2.00 (no SP, no patch, nothing).... So I'll put this on that account :-)

                                   

                                  Anyway,We are now live with 8.6 SP1, and that's really great.

                                   

                                  Thanks guys.

                                  • 14. Re: BSA 86 SP1 Issue with nsh/blcred
                                    Bill Robinson

                                    when you have a nsh path - a server in the dir path - eg //server1/foo/bar then all access will go through the rscd on that server.  so if your os user is mapped to a local account that cannot read //server1/foo/bar you get an error accessing the file.  $HOME will always be just the dir path, no //server1 in the path.  it's always local to wherever you started nsh.  you can always use @ to refer to the box nsh is running from - eg cp //server2/foo/bar //@/foo - or something like that.

                                    1 2 Previous Next