Tentando configurar o perfil móvel para o usuário montando o compartilhamento de samba remoto usando pam_mount . No entanto, a opção nounix está sendo adicionada automaticamente na pasta montada, devido a quais links simbólicos não podem ser criados na pasta compartilhada, nem o programa csync pode ser usado para sincronização.
Arquivos e saídas relevantes:
$ cat /etc/security/pam_mount.conf.xml
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<!--
See pam_mount.conf(5) for a description.
-->
<pam_mount>
<!-- debug should come before everything else,
since this file is still processed in a single pass
from top-to-bottom -->
<debug enable="1" />
<!-- Volume definitions -->
<!-- pam_mount parameters: General tunables -->
<!--
<luserconf name=".pam_mount.conf.xml" />
-->
<!-- Note that commenting out mntoptions will give you the defaults.
You will need to explicitly initialize it with the empty string
to reset the defaults to nothing. -->
<mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
<!--
<mntoptions deny="suid,dev" />
<mntoptions allow="*" />
<mntoptions deny="*" />
-->
<mntoptions require="nosuid,nodev" />
<logout wait="0" hup="0" term="0" kill="0" />
<!-- pam_mount parameters: Volume-related -->
<!-- LINE BELOW WAS ADDED! -->
<volume fstype="cifs" server="server.lan" path="%(DOMAIN_USER)" mountpoint="/home/roaming/%(DOMAIN_NAME)/%(DOMAIN_USER)" options="vers=2.1,uid=%(USER)" />
<mkmountpoint enable="1" remove="true" />
</pam_mount>
$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=1935432k,nr_inodes=483858,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=391560k,mode=755)
/dev/sda1 on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=25,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=3286)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/1274545246 type tmpfs (rw,nosuid,nodev,relatime,size=391560k,mode=700,uid=1274545246,gid=1274544641)
//server.lan/aaditya on /home/roaming/SERVER/aaditya type cifs (rw,relatime,vers=2.1,sec=ntlmssp,cache=strict,username=aaditya,domain=SERVER,uid=1274545246,forceuid,gid=1274544641,forcegid,addr=192.168.1.191,file_mode=0755,dir_mode=0755,nounix,serverino,mapposix,rsize=1048576,wsize=1048576,echo_interval=60,actimeo=1)
gvfsd-fuse on /run/user/1274545246/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1274545246,group_id=1274544641)
tmpfs on /run/user/1001 type tmpfs (rw,nosuid,nodev,relatime,size=391560k,mode=700,uid=1001,gid=1001)
gvfsd-fuse on /run/user/1001/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1001,group_id=1001)
mount.cifs (8) tem as seguintes informações:
nounix
Disable the CIFS Unix Extensions for this mount. This can be useful in order to turn off multiple settings at once. This includes POSIX acls, POSIX locks,
POSIX paths, symlink support and retrieving uids/gids/mode from the server. This can also be useful to work around a bug in a server that supports Unix
Extensions.
See section INODE NUMBERS for more information.
Eu tentei adicionar unix à lista de opções de montagem, mas isso falha com:
mount error(22): Invalid argument
Nov 3 17:24:35 system lightdm: (mount.c:76): Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Por que a opção nounix é adicionada automaticamente como ela pode ser desativada?
Como alternativa, posso saber quais são as opções exatas desativadas pelo nounix para que possam ser ativadas?
OS é o Ubuntu 16.04
$ uname -srm
Linux 4.10.0-38-lowlatency x86_64
Com a pasta já montada por pam_mount , se eu desmontar e depois remontá-lo, recebo o mesmo mount
output.
No entanto, se eu desabilitar a pasta mount em pam_mount , efetue logout, login e tente montá-lo manualmente através da linha de comando, então em alguns casos não obtenho < em> nounix nas opções de montagem? (muito confuso; precisa identificar onde ele funciona e onde ele não funciona)