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.

TCSH, can I set to default for account?

Discussion in 'General Discussion' started by noimad1, Jul 28, 2004.

  1. noimad1

    noimad1 Well-Known Member

    Joined:
    Mar 27, 2003
    Messages:
    627
    Likes Received:
    0
    Trophy Points:
    16
    I have a customer that is asking if we can set tcsh as his default instead of bash. Does anyone know if this can be done, and if so how?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Probably the simplest way would be to create a .bash_profile file in their /home/username/ directory, CHMOD 700 it, and have the following inside:
    Code:
    tcsh
    exit
    Alternatively, you could simply change their shell in /etc/passwd
     
  3. shacker23

    shacker23 Well-Known Member

    Joined:
    Feb 20, 2005
    Messages:
    263
    Likes Received:
    1
    Trophy Points:
    16
    The standard method for changing a user's login shell is the command:

    chsh username
    [ password]
    [type:] /bin/tcsh [or path to other shell]

    To change your own shell, use "chsh" with no arguments.
     
  4. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    When my customer tries to change their shell, they get prompted for a password, and if they enter their password, it fails. Their session looks like this (in this example, their username is blahblah

    [blahblah@www5 ~]$ chsh -s /bin/tcsh
    Changing shell for blahblah.
    Password:
    Password error.
    [blahblah@www5 ~]$


    If I log in as root, it works fine, and no password is requested:

    [root@www5 ~]# chsh -s /bin/tcsh blahblah
    Changing shell for blahblah.
    Shell changed.
    [root@www5 ~]#


    Is this normal, that a customer can't change their own shell without asking for the server owner (as root) to do it for them?

    - Scott
     
  5. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Is the user on jail shell access or normal shell access?
     
  6. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Normal (not Jail Shell)

    - Scott
     
  7. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Problem still exists -- any ideas?

    - Scott
     
  8. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    as root:

    chsh -s /bin/tcsh USERNAME

    or, if running as user:

    chsh -s /bin/tcsh
     
  9. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hi Matt. See my posting above... that is exactly what the user is entering, but he is asked for a password, and if he enters his current password, he is still denied.

    It does not work.

    - Scott
     
  10. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Bump. Anyone?

    Problem still exists.

    - Scott
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Scott, have you listed /bin/tcsh in /etc/shells?
     
  12. sneader

    sneader Well-Known Member

    Joined:
    Aug 21, 2003
    Messages:
    1,126
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    La Crosse, WI
    cPanel Access Level:
    Root Administrator
    Hi Jonathan. I have not done so. What is the effect of doing this?

    As a data point, I have had this shell configured for this customer, but occasionally it changes back... now I've been able to pinpoint why. I recently altered my hosting packages to include more bandwidth. When you alter a package, it gives all existing users with that package those new features/priviledges. And apparently that caused the user to lose his preferred shell. Does that make any sense?

    - Scott
     
  13. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    AFAIK, the shell does need to be listed in /etc/shells for a non-root user to be able to switch themselves using chsh.

    I wouldn't be surprised if the cPanel functionality restored an accounts shell to a cPanel default when when it is updated after a package change.
     
Loading...

Share This Page