Add Samba installation and rename readme to README.md
- Add Samba file sharing installation and configuration to match README documentation (was documented but not implemented) - Rename ubuntu-readme.md to README.md for standard GitHub display - Update download instructions with actual GitHub repository URLs
This commit is contained in:
@@ -56,12 +56,12 @@ Automated setup script for Ubuntu 24.04 Desktop that installs essential tools, c
|
||||
### 1. Download the Script
|
||||
|
||||
```bash
|
||||
# Download (replace URL with actual location)
|
||||
wget https://your-domain.com/post-install.sh
|
||||
# Clone the repository
|
||||
git clone https://github.com/outis1one/post-ubuntu-install.git
|
||||
cd post-ubuntu-install
|
||||
|
||||
# Or create manually
|
||||
nano post-install.sh
|
||||
# Paste the script content and save (Ctrl+O, Enter, Ctrl+X)
|
||||
# Or download the script directly
|
||||
wget https://raw.githubusercontent.com/outis1one/post-ubuntu-install/main/ubuntu-post-install.sh -O post-install.sh
|
||||
```
|
||||
|
||||
### 2. Make Executable
|
||||
@@ -243,6 +243,66 @@ echo "Verifying Docker installation..."
|
||||
docker --version || echo "Warning: Docker verification failed"
|
||||
docker compose version || echo "Warning: Docker Compose verification failed"
|
||||
|
||||
# Install and Configure Samba
|
||||
echo ""
|
||||
echo "Installing Samba file sharing..."
|
||||
echo " - Samba: SMB/CIFS file server for network file sharing"
|
||||
echo ""
|
||||
|
||||
apt install -y samba || echo "Warning: Samba installation failed, continuing..."
|
||||
|
||||
# Configure Samba share for primary drive
|
||||
if command -v smbd &> /dev/null; then
|
||||
echo ""
|
||||
echo "Configuring Samba share for primary drive..."
|
||||
|
||||
# Backup existing config
|
||||
cp /etc/samba/smb.conf /etc/samba/smb.conf.backup-$(date +%Y%m%d-%H%M%S)
|
||||
|
||||
# Add Primary share configuration
|
||||
if ! grep -q "\[Primary\]" /etc/samba/smb.conf; then
|
||||
cat >> /etc/samba/smb.conf << SAMBA_CONFIG
|
||||
|
||||
# Primary drive share - added by post-install script
|
||||
[Primary]
|
||||
comment = Primary Drive
|
||||
path = $ACTUAL_HOME/drives/primary
|
||||
browseable = yes
|
||||
read only = no
|
||||
writable = yes
|
||||
valid users = $ACTUAL_USER
|
||||
create mask = 0775
|
||||
directory mask = 0775
|
||||
SAMBA_CONFIG
|
||||
echo "✓ Added [Primary] share to Samba configuration"
|
||||
else
|
||||
echo "Samba [Primary] share already configured, skipping..."
|
||||
fi
|
||||
|
||||
# Add Samba user
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "SAMBA PASSWORD SETUP"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
echo "Set a password for Samba file sharing access."
|
||||
echo "Tip: Using the same password as your system login is convenient."
|
||||
echo ""
|
||||
smbpasswd -a "$ACTUAL_USER"
|
||||
|
||||
# Enable and restart Samba services
|
||||
systemctl enable smbd nmbd || echo "Warning: Failed to enable Samba services"
|
||||
systemctl restart smbd nmbd || echo "Warning: Failed to restart Samba services"
|
||||
|
||||
echo ""
|
||||
echo "✓ Samba configured successfully"
|
||||
echo " Share name: Primary"
|
||||
echo " Path: $ACTUAL_HOME/drives/primary"
|
||||
echo " Access: \\\\$(hostname)\\Primary (Windows) or smb://$(hostname)/Primary (Mac/Linux)"
|
||||
else
|
||||
echo "✗ Samba installation failed, skipping configuration"
|
||||
fi
|
||||
|
||||
# Install NetBird
|
||||
echo ""
|
||||
echo "Installing NetBird..."
|
||||
|
||||
Reference in New Issue
Block a user