pluspack + su | unable to do normal commands

Problem after su...

Astaro 4.015
Pluspack installed
/etc/profile PATH fixed

Problem:
After su'ing, I am unable to do rudimentary commands such as setenv, printenv, link, etc.

Sample output:
singularity:/var/chroot-report/opt/include # printenv
bash: printenv: command not found

Any help on this matter would be greatly appreciated.

  
Parents
  • The pluspack stuff is broken out into an opt directory; the link is not on your path right now...

    (I seem to remember in the instructions that there is a script you can run to set things up, but I just extract what I need and move it onto my path)

    Check your PATH (do a set)
       
  • I ran the setup config, followed the instructions, and everything works fine, if I log in as root with the keyboard/monitor.

    This problem only surfaces after an su, both from the local machine, as well as via ssh.

    You're correct, the PATH isn't set properly, but the /etc/profile has it listed as what it should be for the pluspack.

    Things work fine after an export PATH=... so I guess the question is, is there somewhere else it's being stored?

    Cheers,
    Nick.  
  • Your password has not been reset. Your path has been updated with the Pluspack path first, you need to change it so that the export PATH line reads like this:

    PATH="$PATH:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin"

    instead of this:

    PATH="/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin:$PATH"

    also at the bottom your etc/profile file add the following

    export LD_LIBRARY_PATH=/lib:/usr/lib:/opt/lib

    To login as root in your current situation, use the following command

    /bin/su -
      
  • Sorry if it wasn't clear before, but I had done all of that. (Did a search here beforehand)

    I'm not having any problems running su, no password problems, however there are problems running stuff AFTER su - the PATH isn't being set properly even though /etc/profile has the correct information.

    There's no problem with PATH when logging in as root via the keyboard on the local machine, but there IS after su'ing to root when logging in as anyone else.  

    The PATH is fine for loginuser, whether via ssh or locally.

    The ONLY problem is an invalid PATH after an su.
  • Path after login as loginuser (ssh/local), and root (local only):
    PATH=/usr/local/bin:/usr/bin:/bin:.:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin

    Path after su:
    PATH=/usr/sbin:/bin:/usr/bin:/sbin:/usr/X11R6/bin
    (X11R6? Should that be there?)

    I then have to do this to recify it:
    export PATH="$PATH:/usr/local/bin:.:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin"

    After exiting su, PATH is back to loginuser's.


    I had previously added/changed these in /etc/profile:

    PATH="$PATH:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin"
    export LD_LIBRARY_PATH=/lib:/usr/lib:/opt/lib
    export PATH


    PATH is still non-working after a restart.  
  • After su - and successful login, root's path is as follows:

    test:/ # echo $PATH
    /sbin:/usr/sbin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin

    loginuser's path is as follows:

    @test:/home/login > echo $PATH
    /usr/local/bin:/usr/bin:/bin:.:/opt/bin:/opt/usr/bin:/opt/sbin:/opt/usr/sbin

       
Reply Children