Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    BANNED
    Join Date
    Jul 2005
    Posts
    537

    Default Error when logging into the box using SSH

    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 [~]#


  2. #2
    Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  3. #3
    BANNED
    Join Date
    Jul 2005
    Posts
    537

    Default

    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. #4
    Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475

    Default

    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
    Last edited by bijo; 10-14-2005 at 08:30 PM.
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  5. #5
    BANNED
    Join Date
    Jul 2005
    Posts
    537

    Default

    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/*
    Last edited by jackie46; 10-14-2005 at 08:13 PM.

  6. #6
    Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475

    Default

    Over write the files with the following command
    cp -vf /etc/skel/.* /home/admin/
    Last edited by bijo; 10-14-2005 at 08:29 PM.
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  7. #7
    BANNED
    Join Date
    Jul 2005
    Posts
    537

    Default

    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. #8
    Member bijo's Avatar
    Join Date
    Aug 2004
    Location
    India
    Posts
    475

    Default

    Hello,

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

    /bin/echo $PATH
    Bijo
    Yahoo: "bijo505"
    Msn: "bijo_baby@hotmail.com"
    AIM: "bijobaby"

    http://slashome.com

  9. #9
    BANNED
    Join Date
    Jul 2005
    Posts
    537

    Default

    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

Similar Threads & Tags
Similar threads

  1. perl5 folder in ~ when logging in via SSH
    By DreamPhysix in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 06-01-2011, 11:38 PM
  2. SSH logging history
    By neo4242002 in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 11-14-2005, 04:20 AM
  3. Logging SSH commands ?
    By Hostbox.be in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 09-06-2005, 04:18 AM
  4. Logging out of SSH - Stopped Jobs?
    By t9clkclnr in forum New User Questions
    Replies: 2
    Last Post: 04-18-2005, 08:57 PM
  5. Logging SSH
    By Pryach in forum New User Questions
    Replies: 1
    Last Post: 02-06-2005, 01:05 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube