Results 1 to 14 of 14

Thread: SSH issues

  1. #1

    SSH issues

    I'm having troubles with my ssh server. I'm using cpanel/whm and when I try to enable or disable shell access I get the following error:
    Shell Access Manager
    Waiting 100 seconds for accounting lock... Waiting 90 seconds for accounting lock... Waiting 80 seconds for accounting lock... Waiting 70 seconds for accounting lock... Waiting 60 seconds for accounting lock... Waiting 50 seconds for accounting lock... Waiting 40 seconds for accounting lock... Waiting 30 seconds for accounting lock... Waiting 20 seconds for accounting lock... Waiting 10 seconds for accounting lock...
    Sorry, the shell, Enable Jailed Shell does not exist!
    & Sorry, the shell, Normal Shell does not exist!
    ------------------------

    Some of them are enabled but you can't login as that user. SSH is running and you can login as a wheel user or root if was enabled but for some reason can't get any regular users to be able to login. I'm running WHM 11.1.0 cPanel ..

    Any ideas of what I can check? Seems like a permissions error. The message logs say "authentication failed" but the passwords are correct.

  2. #2
    Join Date
    Oct 2006
    Location
    New York, NY
    Posts
    1,041
    Check your /etc/shells file and see if its been corrupted. Otherwise, it could be a record in the cPanel db that matches the shell with it.

  3. #3
    etc shells doesn't appear to be corrupt. I opened it and it reads:
    /bin/sh
    /bin/bash
    /sbin/nologin
    /bin/ash
    /bin/bsh
    /bin/ksh
    /usr/bin/ksh
    /usr/bin/pdksh
    /bin/tcsh
    /bin/csh
    /bin/ftpsh
    /usr/local/cpanel/bin/jailshell
    /usr/local/cpanel/bin/noshell
    /usr/local/gcp/bin/nobash
    ------------
    those files exist though except for /usr/local/gcp/bin/nobash . wonder if we're having a permissions issue.

  4. #4
    Join Date
    May 2006
    Location
    India
    Posts
    661
    Check the cpanel error log /usr/local/cpanel/logs/error_log and see whats reporting there.
    SparkSupport.Com - The Premier Tech Company
    Cloud Solutions|Email Infra setup|VOIP|Video Streaming|Software Development
    Email: info@sparksupport.com Phone : 1- 408-600-1449 | Skype : shijils

  5. #5
    Nothing bout ssh. gonna try and comment out that one file that in /etc/shells that doesn't exist. here's a copy of the error log if you wanna look.

    main::parsehtml('GLOB(0xab948b8)') called at cpanel.pl line 355
    main::dotag(undef) called at cpanel.pl line 3410
    main::exectag('<cpanel cPAddons="mainpg(%FORM)">') called at cpanel.pl line 3496
    Cpanel::loadmodule('cPAddons') called at cpanel.pl line 540
    (internal death) Fri Jun 15 16:59:19 2007 [27439] error: Can't locate File/Touch.pm in @INC (@INC contains: /usr/local/cpane$
    eval {...} called at /usr/local/cpanel/Cpanel/FileUtils.pm line 33
    Cpanel::FileUtils::touchfile('/var/cpanel/cpaddons_moderated.yaml') called at /usr/local/cpanel/Cpanel/cPAddons.pm l$
    Cpanel::cPAddons::_write_this('/var/cpanel/cpaddons_moderated.yaml', 'HASH(0xae9976c)') called at /usr/local/cpanel/$
    Cpanel::cPAddons::_write_cache('/var/cpanel/cpaddons_moderated', 'HASH(0xae9976c)') called at /usr/local/cpanel/Cpan$
    Cpanel::cPAddons::_read_cache('/var/cpanel/cpaddons_moderated', 'HASH(0xafa5a44)') called at /usr/local/cpanel/Cpane$
    Cpanel::cPAddons::cPAddons_init() called at (eval 23) line 1
    eval 'Cpanel::cPAddons::cPAddons_init();' called at cpanel.pl line 3597
    main::modloader('cPAddons') called at /usr/local/cpanel/Cpanel.pm line 241
    Cpanel::loadmodule('cPAddons') called at cpanel.pl line 540
    main::exectag('<cpanel cPAddons="mainpg(%FORM)">') called at cpanel.pl line 3496
    main::dotag(undef) called at cpanel.pl line 3410
    main::parsehtml('GLOB(0xab948b8)') called at cpanel.pl line 355
    touch: creating `/var/cpanel/cpaddons_moderated.yaml': Permission denied
    Fri Jun 15 16:59:19 2007 warn [Cpanel:ataStore]: Could not open() file '/var/cpanel/cpaddons_moderated.yaml' for writing: $
    Fri Jun 15 16:59:19 2007 warn [Cpanel:ataStore]: at /usr/local/cpanel/Cpanel/DataStore.pm line 26
    Cpanel:ataStore:tore_ref('/var/cpanel/cpaddons_moderated.yaml', 'HASH(0xae9976c)') called at /usr/local/cpanel/C$
    GNU nano 1.2.1 File: error_log

    Cpanel::cPAddons::_write_this('/var/cpanel/cpaddons_moderated.yaml', 'HASH(0xae9976c)') called at /usr/local/cpanel/$
    Cpanel::cPAddons::_write_cache('/var/cpanel/cpaddons_moderated', 'HASH(0xae9976c)') called at /usr/local/cpanel/Cpan$
    Cpanel::cPAddons::_read_cache('/var/cpanel/cpaddons_moderated', 'HASH(0xafa5a44)') called at /usr/local/cpanel/Cpane$
    Cpanel::cPAddons::cPAddons_init() called at (eval 23) line 1
    eval 'Cpanel::cPAddons::cPAddons_init();' called at cpanel.pl line 3597
    main::modloader('cPAddons') called at /usr/local/cpanel/Cpanel.pm line 241
    Cpanel::loadmodule('cPAddons') called at cpanel.pl line 540
    main::exectag('<cpanel cPAddons="mainpg(%FORM)">') called at cpanel.pl line 3496
    main::dotag(undef) called at cpanel.pl line 3410
    main::parsehtml('GLOB(0xab948b8)') called at cpanel.pl line 355
    Fri Jun 15 16:59:19 2007 warn [cPAddons]: couldn't make missing yaml out of store
    Fri Jun 15 16:59:19 2007 warn [cPAddons]: at /usr/local/cpanel/Cpanel/cPAddons.pm line 2530
    Cpanel::cPAddons::_read_cache('/var/cpanel/cpaddons_moderated', 'HASH(0xafa5a44)') called at /usr/local/cpanel/Cpane$
    Cpanel::cPAddons::cPAddons_init() called at (eval 23) line 1
    eval 'Cpanel::cPAddons::cPAddons_init();' called at cpanel.pl line 3597
    main::modloader('cPAddons') called at /usr/local/cpanel/Cpanel.pm line 241
    Cpanel::loadmodule('cPAddons') called at cpanel.pl line 540
    main::exectag('<cpanel cPAddons="mainpg(%FORM)">') called at cpanel.pl line 3496
    main::dotag(undef) called at cpanel.pl line 3410
    main::parsehtml('GLOB(0xab948b8)') called at cpanel.pl line 355

  6. #6
    Join Date
    Jul 2006
    Location
    On top of the Servers
    Posts
    323
    Are you able to accomplish this task from the backend. Run the following command as root:

    chsh -s /usr/local/cpanel/bin/jailshell <user>
    || Techbrace :: 24 x 7 Outsourced Web Hosting Support since 2006
    || For Hosting Companies & Data Centres :: Helpdesk / Chat / Phone / Social Media :: cPanel / Plesk / DirectAdmin
    || Dedicated / VPS / Cloud Server Management :: Server Support On Demand :: Fully Managed Servers

  7. #7
    Yea. that worked like a charm. Sounds like permissions. Do you know how I can fix this then?

  8. #8
    Join Date
    Mar 2003
    Location
    Canada
    Posts
    9,072
    Paste the output from

    ls -la /usr/local/cpanel/bin/jailshell
    RACK911 Labs | Penetration Testing | https://www.RACK911Labs.ca

    www.HostingSecList.com - Security Notices for the Hosting Community.

  9. #9
    Join Date
    Jul 2006
    Location
    On top of the Servers
    Posts
    323
    Quote Originally Posted by jasonrusso View Post
    Yea. that worked like a charm. Sounds like permissions. Do you know how I can fix this then?
    Glad to hear that. Check whether the permission of /var/cpanel directory is correct by running the following command and let us know the output:

    ls -ld /var/cpanel
    || Techbrace :: 24 x 7 Outsourced Web Hosting Support since 2006
    || For Hosting Companies & Data Centres :: Helpdesk / Chat / Phone / Social Media :: cPanel / Plesk / DirectAdmin
    || Dedicated / VPS / Cloud Server Management :: Server Support On Demand :: Fully Managed Servers

  10. #10
    drwx--x--x 46 root root 4096 Jun 18 19:13 /var/cpanel/
    -rwsr-xr-x 1 root wheel 9368 Mar 16 01:04 /usr/local/cpanel/bin/jailshell*

    Heres both.

  11. #11
    Join Date
    Jul 2006
    Location
    On top of the Servers
    Posts
    323
    Permission of the /var/cpanel directory is fine. It looks like you have some perl modules missing on the server, including File::Touch that is required for cPanel. Plase run the following command:

    /usr/local/cpanel/bin/checkperlmodules

    It will install the necessary perl modules for cPanel and you can verify whether the above perl module is installed by running the following command:

    find /usr/lib -name Touch.pm
    || Techbrace :: 24 x 7 Outsourced Web Hosting Support since 2006
    || For Hosting Companies & Data Centres :: Helpdesk / Chat / Phone / Social Media :: cPanel / Plesk / DirectAdmin
    || Dedicated / VPS / Cloud Server Management :: Server Support On Demand :: Fully Managed Servers

  12. #12
    yea. there was some perl mods missing and now you can enable/disable from the control panel but the users still can't login for whatever reason. So the above fixed the issue from cpanel but still wont allow the user to login to shell even though it's enabled. I tried restarting SSH service and disable and re-enabling the ssh to see if it wouldn't unjar it.

  13. #13
    HI,

    There will be a file called /var/cpanel/acct.lock please remove it and try.

  14. #14
    Quote Originally Posted by shahs21 View Post
    HI,

    There will be a file called /var/cpanel/acct.lock please remove it and try.

    Thank you. I actually posted this in 2007 and the issue was on an old server. Thank you very much though. I was actually suprised to get an email that someone responded to my post because I forgot all about this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •