Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2005
    Posts
    4

    Default Enabling/Disabling shell from command line

    I need to allow a user ssh access but only between certain times over the course of an event.

    What is the command line to enable and then disable shell access for that user?

    Probably give the machine an at job rather than cron to give access as the command will only run a few times. If it goes in cron i'll forget about it.

  2. #2
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    The chsh -s command will change shells for an account. For example:

    Code:
    chsh -s /bin/bash user
    You might also want to do research on PAM as I'm certain there exists a PAM module that will do what you want (i.e. only allow logins at specified times).

Similar Threads & Tags
Similar threads

  1. Enabling Disabling DNS for a domain or multiple domains
    By Datcrack in forum Feature Requests for cPanel/WHM
    Replies: 2
    Last Post: 04-23-2010, 11:19 AM
  2. Users enabling shell access...
    By ahostli in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-28-2006, 12:25 AM
  3. How to enabling and disabling mail delivery confirmations
    By Bulent Tekcan in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 05-02-2006, 02:01 AM
  4. Enabling/Disabling Subdomains on accounts
    By Chalk4Brains in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-20-2005, 12:05 AM
  5. What is the command to restart cpanel via the command line?
    By AbeFroman in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-29-2004, 03:24 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube