Anacron (run as non-root user) can't get password with secret-tool
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/
SHELL=/bin/bash
PATH=/usr/
HOME=/home/myuser
LOGNAME=myuser
1 2 cron.bug echo "the password is $(secret-tool lookup bugreport password)" > /home/myuser/
3. Create a crontab to run myuser's anacron:
*/5 * * * * /usr/sbin/anacron -t /home/myuser/
4. Wait for 7 minutes and then check /home/myuser/
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
ProcVersionSign
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)