systemd share cifs “erro de montagem (13): Permissão negada”

1

Eu quero montar o compartilhamento com /etc/systemd/system
Arquivo: mnt-win7_docs.mount

Conteúdo:

[Unit]
Description=Mount docs

[Mount]
What=//192.168.1.5/docs/
Where=/mnt/win7_docs/
Type=cifs
Options=user,username=<user>,password='<passwd>',iocharset=utf8

[Install]
WantedBy = multi-user.target

Quando eu tento systemctl start mnt-win7_docs.mount

Eu tenho o seguinte erro:

mnt-win7_docs.mount - Mount docs
   Loaded: loaded (/etc/systemd/system/mnt-win7_docs.mount; enabled)
   Active: failed (Result: exit-code) since mar. 2016-09-06 14:59:00 CEST; 2s ago
    Where: /mnt/win7_docs
     What: //192.168.1.5/docs/
  Process: 36306 ExecMount=/bin/mount -n //192.168.1.5/docs/ /mnt/win7_docs -t cifs -o user,username=<user>,password='<passwd>',iocharset=utf8 (code=exited, status=32)

sept. 06 14:59:00 dtools mount[36306]: mount error(13): Permission denied
sept. 06 14:59:00 dtools mount[36306]: Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
sept. 06 14:59:00 dtools systemd[1]: mnt-win7_docs.mount mount process exited, code=exited status=32
sept. 06 14:59:00 dtools systemd[1]: Failed to mount Mount docs
sept. 06 14:59:00 dtools systemd[1]: Unit mnt-win7_docs.mount entered failed state.

Mas quando eu tento: /bin/mount -n //192.168.1.5/docs/ /mnt/win7_docs -t cifs -o user,username=<user>,password='<passwd>',iocharset=utf8 .
Tudo bem ...

Você tem algumas ideias?

    
por All3kcis 06.09.2016 / 15:13

1 resposta

1

Finalmente, funciona.
O problema deve vir de caracteres especiais na senha.

Agora eu tenho:

[Unit]
Description=Mount docs

[Mount]
What=//192.168.1.5/docs/
Where=/mnt/win7_docs/
Type=cifs
Options=user,credentials=/root/.credentials,iocharset=utf8

[Install]
WantedBy = multi-user.target

/root/.credentials

username=<user>
password=<password>

Então, senha sem citações simples.

    
por 14.09.2016 / 11:21