Hi all,
I have created a post jailinstallation and I am strugling to create a user and add the user to a specific group..
So far I managed to workout that the script bellow will create a user and a group of same name.. user:user what I want is user:wpsftp
/etc/ssh/sshd_config
Could anyone please help
I have created a post jailinstallation and I am strugling to create a user and add the user to a specific group..
So far I managed to workout that the script bellow will create a user and a group of same name.. user:user what I want is user:wpsftp
Code:
## create user and group
pw groupadd -q -n $user -g 1002
echo -n '$1$p75bbfK.$Kz3dwkoVlgZrfLZdAXQt91' |\
pw useradd -n $user -u 1002 -c "$user Live" -g $user -G wheel -s /bin/csh -d /home/$user -m -H 0
chown -R $user:$user /home/$user
cat /etc/group
Code:
wpsftp:*:1002:
/etc/ssh/sshd_config
Code:
...
Match Group wpsftp
ChrootDirectory %h
ForceCommand internal-sftp
AllowTcpForwarding no
X11Forwarding no
...