The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Error when logging into the box using SSH

Discussion in 'General Discussion' started by jackie46, Oct 14, 2005.

  1. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    After i get my login prompt and enter my password using SSH2 i get this;

    -bash: id: command not found
    -bash: [: =: unary operator expected
    -bash: id: command not found
    -bash: dircolors: command not found
    -bash: id: command not found
    -bash: [: =: unary operator expected
    -bash: tr: command not found
    -bash: tr: command not found
    -bash: whoami: command not found
    grep: /var/cpanel/users/: Permission denied
    -bash: mesg: command not found
    -bash: dircolors: command not found
    admin@BBox [~]#

    :eek:
     
  2. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
  3. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    Hi thanks, hmm the link says to execute this /usr/local/bin/reskel but that is not found on my server.

    Dont know what happened to my startup files. This box is only 3 or 4 days old.
     
  4. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Oops

    I didn't test that command. Is it a problem with only one user or all ?.The problem is that you are missing the path. if problem with only one user copy the /etc/skel/* files to his home directory.
    You can use the following command to do that
    /bin/cp -vf /etc/skel/.* /home/user/

    Then logout from ssh and then connect again. Let me know the status ;)
     
    #4 bijo, Oct 14, 2005
    Last edited: Oct 14, 2005
  5. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    Its the problem with the admin user.

    root login is disabled, When we log in as admin we see this. When we login as root we dont see it.

    The admin account already has;

    -rw------- 1 admin admin 482 Oct 14 18:47 .bash_history
    -rw-r--r-- 1 admin admin 24 Oct 8 13:16 .bash_logout
    -rw-r--r-- 1 admin admin 191 Oct 8 13:16 .bash_profile
    -rw-r--r-- 1 admin admin 124 Oct 8 13:16 .bashrc
    -rw-r--r-- 1 admin admin 237 Oct 8 13:16 .emacs
    -rw-r--r-- 1 admin admin 120 Oct 8 13:16 .gtkrc
    drwxr-xr-x 3 admin admin 4096 Oct 8 13:16 .kde/

    Same as /etc/skel/*
     
    #5 jackie46, Oct 14, 2005
    Last edited: Oct 14, 2005
  6. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Over write the files with the following command
    cp -vf /etc/skel/.* /home/admin/
     
    #6 bijo, Oct 14, 2005
    Last edited: Oct 14, 2005
  7. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    I dont think its allowing me to overwrite those files.

    [~]# cp -vf /etc/skel/.* /home/admin/
    cp: omitting directory `/etc/skel/.'
    cp: omitting directory `/etc/skel/..'
    cp: overwrite `/home/admin/.bash_logout'? y
    `/etc/skel/.bash_logout' -> `/home/admin/.bash_logout'
    cp: overwrite `/home/admin/.bash_profile'? y
    `/etc/skel/.bash_profile' -> `/home/admin/.bash_profile'
    cp: overwrite `/home/admin/.bashrc'? y
    `/etc/skel/.bashrc' -> `/home/admin/.bashrc'
    cp: overwrite `/home/admin/.emacs'? y
    `/etc/skel/.emacs' -> `/home/admin/.emacs'
    cp: overwrite `/home/admin/.gtkrc'? y
    `/etc/skel/.gtkrc' -> `/home/admin/.gtkrc'
    cp: omitting directory `/etc/skel/.kde'
    cp: overwrite `/home/admin/.zshrc'? y
    `/etc/skel/.zshrc' -> `/home/admin/.zshrc'

    Still seeing the same thing when loggin in as admin, Weird.
     
  8. bijo

    bijo Well-Known Member

    Joined:
    Aug 21, 2004
    Messages:
    475
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Hello,

    I think, you are missing the system path. What path do you get after run this command user as admin

    /bin/echo $PATH
     
  9. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    As Admin i get and this is the problem login

    [~]# /bin/echo $PATH
    /usr/local/jdk/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/home/admin/bin

    As root i get

    /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin
     
Loading...

Share This Page