How does useradd determine the default mailbox/maildir location for new users

Niek Dekker niekdekker at gmail.com
Tue Oct 10 13:28:44 PDT 2006


Hi Lowell, thanks for the clarification. I'll have a look at the adduser 
script and probably make my own version.

Regards,
Niek


Lowell Gilbert wrote:
> Niek Dekker <niekdekker at gmail.com> writes:
>
>   
>> I am running Exim 4.62 MTA on FBSD 6.0_release.
>> When I create a new user using useradd, a mailbox file for the new
>> user is created in /var/mail.
>>     
>
> I assume you mean adduser(8).
>
>   
>> As I am using Maildir with maildirs in /var/mail, I do not want that.
>>     
>
> Hmm, yes.  
>
>   
>> My question is, where is this behavior of useradd configured?
>>     
>
> It isn't.  It appears to be hardwired into pw(8), which is the basic
> tool around which adduser(8) is built.
>
>   
>> I cannot find this in the handbook. There is no /etc/useradd.conf
>> neither an /etc/pw.conf on my system and also the contents of
>> /usr/share/skel do not seem to make a difference.
>>     
>
> And none of those are documented to do anything of the sort.
> I think you should just write your own wrapper.  You could write it as
> a wrapper for adduser, or you could make your own version of adduser
> (which is just a shell script). 
>
>   


More information about the freebsd-questions mailing list