Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When there is no .zshrc file in a user's home directory and zsh is started, an interactive configuration utility is run instead of directly giving access to the shell prompt.

I set up zsh to be the default shell on my Debian Wheezy systems. Therefore every newly created user gets zsh as login shell if I do not change that manually. Also there is a default .zshrc in /etc/skel, so all regular users on my system have a copy of the file in their home directory. This is not the case for system users.

When I now change into a system user (for example the user for a specific network daemon) via sudo or sh I run into the configuration tool, because these users have no .zshrc in their home directories.

It doesn't feel right to place a .zshrc into each and every daemon's home directory, which also would be a pain to setup and maintain on a lot of systems. But I still wouldn't want to downgrade to a less comfortable bash for these users.

Is there a way to disable the zsh configuration tool without having to create a .zshrc file in the user's home directory? Additionally a way to setup a single file to be the system-wide default .zshrc for all users which don't have one would be nice too.

share|improve this question

1 Answer 1

up vote 3 down vote accepted

from: http://www.zsh.org/mla/users/2007/msg00398.html

The shell then executes code in the file
scripts/newuser in the shared library area (by default
/usr/local/share/zsh/<VERSION>/scripts/newuser).  This feature can be
turned off simply by removing this script.  The module can be removed
entirely from the configured shell by editing the line starting
"name=zsh/newuser" in the config.modules file, which is generated in the
top level distribution directory during configuration: change the line to
include "link=no auto=no".

and /etc/zsh/zshrc is sourced by every shell that has the interactive,rcs, & globalrc options set. (which most interactive zsh processes do)

or add zsh-newuser-install() { :; } in /etc/zshenv

share|improve this answer
Thanks. But isn't there a way without modifying such a file? I guess if upstream updates it, my Debian package manager will overwrite it. –  aef Dec 8 '12 at 2:58
updated my answer. –  llua Dec 8 '12 at 4:57
Could you please explain that. What does Privileged do and why will it only be called for users with IDs above 999? –  aef Dec 8 '12 at 5:07
-lt == Less than, the option will only be set if the uid is less than 1000, most daemon user accounts are under 1000. && man zshoptions | less -p 'Shell State' –  llua Dec 8 '12 at 17:08
setopt Privileged doesn't disable the configuration utility and I don't read that out of the manpage either. And the case that the newuser file being modified back to it's original state by the system package manager already happened once since your original post. –  aef Dec 17 '12 at 19:56

Your Answer


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.