mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-30 16:53:40 +00:00
Allow samba to use PAM (needs cleartext passwords for now)
svn path=/nixos/trunk/; revision=14768
This commit is contained in:
parent
fd3d09b37c
commit
40f38560d4
@ -249,6 +249,7 @@ import ../helpers/make-etc.nix {
|
||||
"useradd"
|
||||
"chsh"
|
||||
"xlock"
|
||||
"samba"
|
||||
"kde"
|
||||
"cups"
|
||||
"ftp"
|
||||
|
4
etc/pam.d/samba
Normal file
4
etc/pam.d/samba
Normal file
@ -0,0 +1,4 @@
|
||||
auth include common
|
||||
account include common
|
||||
password include common
|
||||
session include common
|
@ -5,7 +5,12 @@ let
|
||||
user = "smbguest";
|
||||
group = "smbguest";
|
||||
|
||||
smbConfig = ./smb.conf ;
|
||||
#smbConfig = ./smb.conf ;
|
||||
|
||||
smbConfig = pkgs.substituteAll {
|
||||
src = ./smb.conf;
|
||||
inherit samba;
|
||||
};
|
||||
|
||||
in
|
||||
|
||||
@ -45,13 +50,13 @@ start script
|
||||
|
||||
${samba}/sbin/nmbd -D -s ${smbConfig} &
|
||||
${samba}/sbin/smbd -D -s ${smbConfig} &
|
||||
${samba}/sbin/winbindd -B -s ${smbConfig} &
|
||||
${samba}/sbin/winbindd -s ${smbConfig} &
|
||||
|
||||
ln -fs ${smbConfig} /var/samba/config
|
||||
|
||||
end script
|
||||
|
||||
respawn ${samba}/sbin/nmbd -D -s ${smbConfig} &; ${samba}/sbin/smbd -D -s ${smbConfig} &; ${samba}/sbin/winbindd -B &
|
||||
respawn ${samba}/sbin/nmbd -D -s ${smbConfig} &; ${samba}/sbin/smbd -D -s ${smbConfig} &; ${samba}/sbin/winbindd &
|
||||
|
||||
";
|
||||
|
||||
|
@ -1,9 +1,23 @@
|
||||
[global]
|
||||
workgroup = Users
|
||||
security = share
|
||||
server string = %h
|
||||
comment = Samba
|
||||
local master = no
|
||||
log file = /var/log/samba/log.%m
|
||||
log level = 10
|
||||
max log size = 50000
|
||||
security = user
|
||||
|
||||
#must be set to 'no' to use PAM
|
||||
encrypt passwords = No
|
||||
client plaintext auth = yes
|
||||
client lanman auth = Yes
|
||||
dns proxy = no
|
||||
invalid users = root
|
||||
passdb backend = tdbsam
|
||||
passwd program = /usr/bin/passwd %u
|
||||
|
||||
# encrypt passwords = yes
|
||||
# smb passwd file = @samba@/private/smbpasswd
|
||||
|
||||
#[default]
|
||||
# path = /home/smbd
|
||||
@ -11,7 +25,11 @@
|
||||
# guest ok = yes
|
||||
|
||||
[raidbackup]
|
||||
path = /home/raidbackup
|
||||
path = /home/raidbackup/files
|
||||
read only = no
|
||||
guest ok = no
|
||||
|
||||
available = yes
|
||||
browseable = yes
|
||||
public = yes
|
||||
valid users = raidbackup
|
||||
comment = Raid backup Files
|
||||
|
Loading…
Reference in New Issue
Block a user