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"
|
"useradd"
|
||||||
"chsh"
|
"chsh"
|
||||||
"xlock"
|
"xlock"
|
||||||
|
"samba"
|
||||||
"kde"
|
"kde"
|
||||||
"cups"
|
"cups"
|
||||||
"ftp"
|
"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";
|
user = "smbguest";
|
||||||
group = "smbguest";
|
group = "smbguest";
|
||||||
|
|
||||||
smbConfig = ./smb.conf ;
|
#smbConfig = ./smb.conf ;
|
||||||
|
|
||||||
|
smbConfig = pkgs.substituteAll {
|
||||||
|
src = ./smb.conf;
|
||||||
|
inherit samba;
|
||||||
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
@ -45,13 +50,13 @@ start script
|
|||||||
|
|
||||||
${samba}/sbin/nmbd -D -s ${smbConfig} &
|
${samba}/sbin/nmbd -D -s ${smbConfig} &
|
||||||
${samba}/sbin/smbd -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
|
ln -fs ${smbConfig} /var/samba/config
|
||||||
|
|
||||||
end script
|
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]
|
[global]
|
||||||
workgroup = Users
|
workgroup = Users
|
||||||
security = share
|
|
||||||
server string = %h
|
server string = %h
|
||||||
comment = Samba
|
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]
|
#[default]
|
||||||
# path = /home/smbd
|
# path = /home/smbd
|
||||||
@ -11,7 +25,11 @@
|
|||||||
# guest ok = yes
|
# guest ok = yes
|
||||||
|
|
||||||
[raidbackup]
|
[raidbackup]
|
||||||
path = /home/raidbackup
|
path = /home/raidbackup/files
|
||||||
read only = no
|
read only = no
|
||||||
guest ok = no
|
guest ok = no
|
||||||
|
available = yes
|
||||||
|
browseable = yes
|
||||||
|
public = yes
|
||||||
|
valid users = raidbackup
|
||||||
|
comment = Raid backup Files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user