<[EMAIL PROTECTED]> wrote :
>that having got all that set up I then found a load of
>'can't chdir to maildir' messages in the log. After some experimentation
>I tried setting the offending home directories rwxrwxr-x and things
>started working
I myself spent alot of time setting up the right permissions for my
users (real ones, not virtual), so I came up with this script :
I think it should be posted some public place, maybe even LWQ -
it will definitelly make newbies life easier :
#!/bin/sh
/usr/sbin/useradd -m -c '$2' -d /home/$1 -s '/bin/false' -G '' -g 45 -e ''
$1
/usr/bin/chage -m -1 -M 99999 -W -1 $1
passwd $1
cd /home/$1
/usr/bin/qmail/maildirmake ./Maildir
echo ./Maildir/ > .qmail
chmod -R 755 ./Maildir
chmod 644 .qmail
chown -R $1 ./Maildir
chown $1 .qmail
call this script with username as the first parameter, and user
description as a second. whoever needs to know the right permissions
and ownership of files - look at the last 4 lines.
This useradd is configured to block normal logins to the system, so these
accounts
cannot be used for telnet, ftp or otherwise (which was my intention). If you
need full accounts,
replace the furst line with :
/usr/sbin/useradd -m -c '$2' -d /home/$1 -G '' -g 45 -e '' $1
Alex.