configure /etc/pam.d/crond to use pam_mount
Simone Gaiarin
simgunz at gmail.com
Sun Oct 9 08:02:11 UTC 2016
I'm sorry. I'll try to explain my problem better.
Short version: Cron jobs cannot access the content of the encrypted disk
even when I'm logged in. I can access the content of the disk from bash or
graphical file explorer.
Longer version:
I've first seen problem because I'm using backintime to perform automatic
backup of my disk. When I run the backup manually everything is fine, while
when the backup is performed automatically with cron the resulting backup
is always empty.
Adding the follwing command to crontab (using crontab -e), in order to list
the content of the drive (/media/dataHD), show me that the ls of the drive
doesn't produce any result.
*/1 * * * * ls -la /media /media/dataHD /media/dataHD/work > /tmp/filelist
I've the following configuration files (based on this guide
https://wiki.archlinux.org/index.php/Talk:Pam_mount):
/etc/pam.d/pammount (I've created this file)
#%PAM-1.0
auth optional pam_mount.so
password optional pam_mount.so
session optional pam_mount.so
/etc/pam.d/system-local-login
#%PAM-1.0
auth include system-login
auth include pammount
account include system-login
account include pammount
password include system-login
password include pammount
session include system-login
session include pammount
/etc/pam.d/sddm
#%PAM-1.0
auth include system-login
auth include pammount
account include system-login
account include pammount
password include system-login
password include pammount
session include system-login
session include pammount
I hope I've been more clear now.
Thanks
On Sun, Oct 9, 2016 at 8:16 AM Thorsten Kukuk <kukuk at suse.de> wrote:
On Sat, Oct 08, Simone Gaiarin wrote:
> pam_mount decrypt the disk using the password the user input in the login
> screen of the OS. Now in the moment I'm logged in and the disk is
decrypted
> how can I make cron see the disk? I'm not interested in having cron
running
> jobs when I'm not logged in (and so the disk is encrypted).
At the moment, where your user is logged in, everybody can see
the disk, even cron. No pam_mount is needed there for cron.
Maybe you should explain at first what your problem exactly is
and not start with a solution first?
Thorsten
--
Thorsten Kukuk, Senior Architect SLES & Common Code Base
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
_______________________________________________
Pam-list mailing list
Pam-list at redhat.com
https://www.redhat.com/mailman/listinfo/pam-list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pam-list/attachments/20161009/92fb91a2/attachment.htm>
More information about the Pam-list
mailing list