Difference between revisions of "Samba"

From UVOO Tech Wiki
Jump to navigation Jump to search
Line 44: Line 44:
 
```
 
```
 
session optional pam_mkhomedir.so skel=/etc/skel umask=077
 
session optional pam_mkhomedir.so skel=/etc/skel umask=077
 +
```
 +
 +
 +
# Access
 +
```realm permit statements handle ACLs with sssd but with windbind let's use pam to restrict auth connections.
 +
/etc/pam.d/sshd
 +
account required pam_access.so
 +
to enforce
 +
/etc/security/access.conf
 +
+ : usertoallow : ALL
 +
 +
: ALL : ALL
 +
https://ubuntuforums.org/showthread.php?t=1385235
 
```
 
```

Revision as of 23:45, 27 April 2020

Setting Up

This seems to work

Other

Client

gvfs-mount smb://stay@nas/stay

mount sucks as must be root use above or gui tools

sudo mount -t cifs -o username=myuser //nas/myuser /mnt/smbmount

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/windows_integration_guide/smb-sssd

New-SmbMapping -UserName jtest -password 123123 -LocalPath 'M:' -RemotePath '\10.250.24.12\jtest'

alternatives --display cifs-idmap-plugin

alternatives --set cifs-idmap-plugin /usr/lib/cifs-utils/idmapwb.so

alternatives --set cifs-idmap-plugin /usr/lib64/cifs-utils/cifs_idmap_sss.so

smbpasswd -a jebusk

New-SmbMapping -LocalPath 'O:' -RemotePath '\10.250.24.12\jtest3'

/var/lib/samba/private/passdb.tdb

Ubuntu 18.04

vim /etc/pam.d/common-session # at bottom of file

session optional pam_mkhomedir.so skel=/etc/skel umask=077

Access

```realm permit statements handle ACLs with sssd but with windbind let's use pam to restrict auth connections.
/etc/pam.d/sshd
account required pam_access.so
to enforce
/etc/security/access.conf
+ : usertoallow : ALL
ALL : ALL https://ubuntuforums.org/showthread.php?t=1385235 ```