Problem with user registration

bluenet

Verified User
Joined
Jul 3, 2011
Messages
47
Dear,


It is happening when a new user control panel gives this error is created, just create the account:

/usr/local/directadmin/scripts/custom/user_create_post.sh: line 6: username: command not found chown: cannot access `/home/webos/.spamassassin/user_prefs': No such file or directory chmod: cannot access `/home/webos/.spamassassin/user_prefs': No such file or directory

Execute permissions regeneration and follows the same error

How can I solve it?

thanks
 
line 6: username: command not found c

You or have misspelled the custom script or there is something else wrong, you should paste the script here or send via pm to me.

The script needed is: /usr/local/directadmin/scripts/custom/user_create_post.sh

Regards
 
The script is the original that comes with the Directadmin, never change and one day started with that error.

I copy and paste the script

#!/bin/sh
if [ "$spam" = "ON" ]; then
DIR=/home/$username/.spamassassin
mkdir $DIR
touch $DIR/user_pref
chown $(username):mail $DIR
chmod 771 $DIR
chown $username:$username $DIR/user_prefs
chmod 755 $DIR/user_prefs
touch $DIR/spam
chown mail:$username $DIR/spam
chmod 660 $DIR/spam
fi
exit 0;

Scripts (user_create_post.sh and spam.sh) have permissions like directadmin owner and group 700

Thanks
 
No custom script come out with directadmin...

The script permission and owner is right as is.

Change line 6 from:

Code:
chown $(username):mail $DIR

to

Code:
chown $username:mail $DIR

Regards
 
Now it gives this error:

User pruebada4 created
Unix User created successfully

User's System Quotas set
User's data directory created successfully
Domains directory created successfully
Domains directory created successfully in user's home

Domain Created Successfully

chown: cannot access `/home/pruebada4/.spamassassin/user_prefs': No such file or directory chmod: cannot access `/home/pruebada4/.spamassassin/user_prefs': No such file or directory

Thanks
 
mmmh, just notice that you can just remove that file since you're not importing any standard preferences.

So, just remove the file and you'll be fine.

Regards
 
What you say is that I delete the line gives the error?

What we want is to work as work.

In logs no information of this error is happening when upgrading or Directadmin in last previous update. As I also told never to edit the file. It only change the permissions to 755 as I said and went back to help put the default permissions.

regards
 
You should just delete that file cause do nothing particular.

Usually that script is customized, and not pre-installed from directadmin setup.

I do have a similar one cause i do use to pre-set some mail filter, if you dont (cause actually that script dont) you can safety just delete that file with no issue at all.

Regards
 
Back
Top