Last active
March 28, 2017 19:32
-
-
Save olmosleo/4a8d8b8b3d7ca94a0840cbcbe814bce7 to your computer and use it in GitHub Desktop.
Create User FTP or SFTP (CentOS 6 or CentOS 7)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# create a user to test the services (FTP and SFTP) | |
# $1 -> nombre_de_usuario | |
# $2 -> password | |
#!/bin/bash | |
# create a user to test the services (FTP and SFTP) | |
# $1 -> nombre_de_usuario | |
# $2 -> password | |
sudo useradd $1 -p $2 -g ftp -d /srv/ftp/$1 -s /sbin/nologin | |
# if u wan soport SFTP (with ssh) | |
# sudo useradd $1 -p $2 -g ftp -d /srv/ftp/$USUARIO -s /bin/bash | |
#sudo mkdir /sr/ftp/$1/ | |
sudo chown $1:ftp -R /srv/ftp/$1/ | |
sudo passwd $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment