Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've a Synology DS412+ NAS box running Busybox, which has a default shell of ash. Previously, ipkg install optware-devel was run and it installed bash and set it as the default shell. Running ipkg install zsh has installed zsh but not set it as the default shell. chsh is not present (Busybox assumes a cut down system and only ash will be used), so how do I set the default shell?

I'd be very grateful for any help or insight .

share|improve this question

migrated from stackoverflow.com May 15 at 14:03

This question came from our site for professional and enthusiast programmers.

1 Answer 1

up vote 3 down vote accepted

You can change the login shell by editing /etc/passwd. Each line is a list of colon-separated values, the last of which is the login shell:

user:x:1000:1000:User:/home/user:/usr/bin/zsh

If /etc/shells exists, you should add zsh (full path) to it, else some services may not work for your user.

Note:

I'd suggest against changing the login shell for root (or any user you need for administrative purposes) if zsh is installed on one of the disks. You may want to still have root access without installed disks.

You always could start zsh automatically from ash's user configuration. Something like that

[ -x /usr/bin/zsh ] && exec /usr/bin/zsh
share|improve this answer
    
Thank you, very much appreciated. –  Iain May 14 at 15:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.