fruworg.github.io/content/posts/cifs-automount.md
root c793b55750 Revert "remove shell"
This reverts commit 65914f8895a7183915bb9484a725085cd24038f1.
2023-09-24 18:58:33 +03:00

43 lines
885 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: Автомонтирование сетевых дисков на Linux
description: CIFS/SMB
date: 2023-05-12T18:10:00+05:00
tags: [linux, krb5]
---
## Установка пакета
```shell
apt install cifs-utils -y
```
## Создание файла с данными УЗ
```shell
username=<username>
password=<password>
domain=<domain>
# /root/.smbuser
```
## Смена прав на файл с данными УЗ
```shell
sudo chmod 0400 /root/.smbuser
```
## Развёртывание
```shell
//<address> /<folder> cifs credentials=/root/.smbuser,uid=<uid>,gid=<gid> 0 0
# /etc/fstab
```
## Монтирование всех директорий
```shell
mount -a
```
## Монтирование ручками (необязательно)
```shell
mount -t cifs //<address> /<folder> -o \
username=<username>,password=<password>,domain=<domain>
```