Network windows/linux stuff
Here’s the table of contents:
- Mount a smb share on Windows
- Get public ip using cli
- Create a linux uuser and changing default shell of a suer
- Setup a smb share
Mount a smb share on Windows
net use Z: \\100.100.10.10\share /USER:WORKGROUP\username pwd123 /PERSISTENT:YES
Get public ip using cli
dig +short myip.opendns.com @resolver1.opendns.com
Create a linux uuser and changing default shell of a suer
sudo useradd -m username
passwd username
su username
chsh -s /usr/bin/bash
Setup a smb share
sudo apt install samba
sudo ufw allow samba
sudo usermod -aG sambashare username
# Edit /etc/samba/smb.conf
sudo smbpasswd -a username
[share]
path = /opt/sharedfolder
read only = no
browseable = yes
force create mode = 0660
force directory mode = 2770
valid users = @username
# Also add ntlm auth=true to smb.conf [global]