Anacron (run as non-root user) can't get password with secret-tool

Bug #1277196 reported by OrelEagle
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
anacron (Ubuntu)
New
Undecided
Unassigned

Bug Description

I have set up anacron for a non-root user ("myuser") to run several scripts. All of them work well, except the ones where I use secret-tool to get a password from the keyring.

I have tried to run these scripts from the command line (same user) and they run without any issue.

To reproduce:

1. Store a password in the keyring with secret-tool:

secret-tool store --label=bugtest bugreport password

enter "test" as password

2. Create the file ~/.anacron/anacrontab with this content

SHELL=/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
HOME=/home/myuser
LOGNAME=myuser

1 2 cron.bug echo "the password is $(secret-tool lookup bugreport password)" > /home/myuser/.anacron/output

3. Create a crontab to run myuser's anacron:

*/5 * * * * /usr/sbin/anacron -t /home/myuser/.anacron/anacrontab -S /home/myuser/.anacron/spool

4. Wait for 7 minutes and then check /home/myuser/.anacron/outuput. It will just contain this line:

the password is

5. Run the same command from the command line and check that file again, it contain:

the password is test

ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: anacron 2.3-19ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-15.25-generic 3.11.10
Uname: Linux 3.11.0-15-generic x86_64
ApportVersion: 2.12.5-0ubuntu2.2
Architecture: amd64
Date: Thu Feb 6 19:04:43 2014
InstallationDate: Installed on 2013-10-21 (107 days ago)
InstallationMedia: Ubuntu-GNOME 13.10 "Saucy Salamander" - Release amd64 (20131017)
MarkForUpload: True
SourcePackage: anacron
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
OrelEagle (oreleagle) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.