Server Requirement
RAID 5 or RAID 10
OS: Ubuntu Server 16.04 64bit or the latest version
During installation, select SSH and Samba
Service: SSH, Samba
Command:
Create user aa for Samba and SSH access
sudo useradd aa
sudo passwd aa ##then type in password manually
sudo groupadd sftp
sudo gpasswd -a aa sftp
Create Samba share folder
cd /
sudo mkdir share
cd share
sudo mkdir Test
cd Test
sudo mkdir Ultra ##or name a better one for the project
sudo chown aa.aa Ultra/
sudo chmod 700 Ultra/
Configure Samba service
sudo apt-get install samba samba-common
sudo smbpasswd -a aa ##type in password, add user aa to access Samba service
sudo vim /etc/samba/smb.conf
##add the following to the end of the smb.conf file
[share]
comment = Folder for File Sharing
path = /share
public = no
writable = yes
valid users = aa
Configure SSH Service
sudo vim /etc/ssh/sshd_config
## comment out the existing setting first: #UsePAM Yes, and #Subsystemsftp /usr/lib/openssh/sftp-server, then add the following to the end of the sshd_config file
UsePAM no
AllowUsers root ultra aa ##careful
keep the existing admin account and don’t remove it
ClientAliveInterval 60
ClientAliveCountMax 86400
Subsystem sftp internal-sftp
Match group sftp
ForceCommand internal-sftp
ChrootDirectory /shareDoc/TestLog
Restart Services:
sudo service smbd restart
sudo service sshd restart
sudo service ssh restart
Verification
Access the Samba service from any Windows PC
\\Internal IP
System pop up authentication window then type in user name and password for aa