Skip to content

Instantly share code, notes, and snippets.

View msarsha's full-sized avatar
🏠
Working from home

Matan Sar-Shalom msarsha

🏠
Working from home
View GitHub Profile
@msarsha
msarsha / cifs_automount.md
Last active July 19, 2024 05:06 — forked from akiross/cifs_automount.md
Automatically mount shared windows folders at boot on linux w/ systemd

Automount of CIFS (smbfs) folders w/ systemd

i.e. mounting your Windows shares on Linux at boot

First, let's see how to mount the remote directory. Assume that there is a shared folder over the network at \\192.168.1.1\users\self\shared which is accessible with user myuser and password secret123.

We could mount it manually in /mnt/winshare with:

# mount -t cifs //192.168.1.1/users/self/shared /mnt/winshare -o user=myuser,password=secret123

This should work on your Linux box, because systemd will basically call mount with the same arguments: What (//192.168.1.1/users/self/shared), Where (/mnt/winshare) and Options (user=myuser,password=secret123).

Proxmox

So if you're using Proxmox you need to open up ssh and run the following commands:

  1. Setup a root password
sudo passwd root