bobbiedigital
Programmer
Hi i have installed a copy of mandrake 10.1 on a server, i have created a adduser.sh which is as such
#!/bin/sh
username=$1
password=$2
group=$3
mkdir /home/$username
mkdir /home/$username/public_html
cp .htaccess /home/$username/public_html/.htaccess
/usr/sbin/useradd -g $group \-d /home/$username -s /bin/bash $username
chmod 7755 /home/$username
chmod 7755 /home/$username/*
chown -R $username:$group /home/$username/*
echo $username:$password | /usr/sbin/chpasswd
exit
we has this working when using a user under the admin group,
then it kept changing the permissions to user:root, group:root, and it stopped from working giving us this error
useradd:unable to lock password file
any help would be greatly appreciated.
thankkyou bobbie
#!/bin/sh
username=$1
password=$2
group=$3
mkdir /home/$username
mkdir /home/$username/public_html
cp .htaccess /home/$username/public_html/.htaccess
/usr/sbin/useradd -g $group \-d /home/$username -s /bin/bash $username
chmod 7755 /home/$username
chmod 7755 /home/$username/*
chown -R $username:$group /home/$username/*
echo $username:$password | /usr/sbin/chpasswd
exit
we has this working when using a user under the admin group,
then it kept changing the permissions to user:root, group:root, and it stopped from working giving us this error
useradd:unable to lock password file
any help would be greatly appreciated.
thankkyou bobbie