Complete.Org: Mailing Lists: Archives: offlineimap: March 2008:
Re: Syncing multiple IMAP/ user accounts
Home

Re: Syncing multiple IMAP/ user accounts

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Daniel Meszaros <spam@xxxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: Syncing multiple IMAP/ user accounts
From: Vincent Beffara <vbeffara+ml@xxxxxxxxx>
Date: Tue, 18 Mar 2008 19:06:59 +0100

> Hi,
>=20
> Vincent Beffara schrieb:
> > (Assuming you are running linux or something similar.)
>=20
> Yes.
>=20
> > If you have root access to your machine, you could always make a spec=
ial
> > user who is a sudoer with no password but can only run offlineimap as
> > whoever he wants - and let _her_ have a crontab entry to do what you
> > want.
> >=20
> > * * * * * sudo -u joe offlineimap
> > * * * * * sudo -u jane offlineimap
>=20
> I've never played around with "sudo" up to now. What I've seen is that
> I'd have to edit /etc/sudoers. Will this make it possible for root to
> work with joe or jane's permissions also if they do not have a shell
> assigned in /etc/passwd?

If they have /bin/false as a shell and a disabled account, then yes it=20
does :

galadriel-~ > sudo grep dhcp /etc/passwd /etc/shadow
/etc/passwd:dhcp:x:101:101::/nonexistent:/bin/false
/etc/shadow:dhcp:!:13821:0:99999:7:::

galadriel-~ > sudo -u dhcp id                                            =
                                                                         =
                                                   =20
uid=3D101(dhcp) gid=3D101(dhcp) groups=3D101(dhcp)

(BTW this is running as myself and not as root, which is the whole point=20
of using sudo - if you run as root, you don't really need it ...) The=20
line you will need in /etc/sudoers is something like

offlineimap localhost=3D(ALL) NOPPASSWD: /usr/bin/offlineimap

(meaning 'the user offlineimap, when connected on localhost, can,=20
without having to give her password, run the command=20
/usr/bin/offlineimap as any user'). Check the manpage though !

  /v

--=20
Vincent Beffara
UMPA - ENS-Lyon
46 all=E9e d'Italie
69364 Lyon Cedex 07
T=E9l : 04 72 72 85 25



[Prev in Thread] Current Thread [Next in Thread]