From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by nuthatch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Ft453-00061r-Ap for garchives@archives.gentoo.org; Wed, 21 Jun 2006 14:53:21 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.13.7/8.13.6) with SMTP id k5LEogPK015649; Wed, 21 Jun 2006 14:50:42 GMT Received: from zaz.kom.auc.dk (zaz.kom.auc.dk [130.225.51.10]) by robin.gentoo.org (8.13.7/8.13.6) with ESMTP id k5LEg276023750 for ; Wed, 21 Jun 2006 14:42:03 GMT Received: from pc163-c.stud.ies.auc.dk ([10.8.12.163]) by zaz.kom.auc.dk with esmtp (Exim 2.05 #3) id 1Ft3u5-0005k9-00 for gentoo-user@lists.gentoo.org; Wed, 21 Jun 2006 16:42:01 +0200 From: Bo =?utf-8?q?=C3=98rsted_Andresen?= To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Problem: unprivileged user cannot use /usr/bin/crontab Date: Wed, 21 Jun 2006 16:39:56 +0200 User-Agent: KMail/1.9.3 References: <20060621113412.GA23599@nibiru.local> <20060621133231.GA9851@nibiru.local> <20060621152049.76364579@hactar.digimed.co.uk> In-Reply-To: <20060621152049.76364579@hactar.digimed.co.uk> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1707284.FPnfOe0uiD"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606211642.49257.bo.andresen@zlin.dk> X-Archives-Salt: 8bbc7912-3f04-4838-9483-2e947318d608 X-Archives-Hash: 20641baf1e3f6b76bf6f70720baa2052 --nextPart1707284.FPnfOe0uiD Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 21 June 2006 16:20, Neil Bothwick wrote: > egrep ^.*?:.*?:.*?:100: /etc/passwd | cut -d: -f1 | while read u do gpass= wd > -a $u cron; done > > will add all users from group GID 100 (users on this system) to the cron > group. Well... awk -F: "\$4~/^\ `awk -F: '$1~/^users$/{print $3}' < /etc/group`\ \$/{print \$1}" < /etc/passwd | \ while read user; do gpasswd -a "$user" cron done ;) =2D-=20 Bo Andresen --nextPart1707284.FPnfOe0uiD Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) iD8DBQBEmVrp8/kKEzmwNNoRAvd9AJ92OfCpU13a/IyxiY8JaS0L73PIqQCfbFGi qxTnzRMKjeeNoYYa5tn8MDQ= =KZyk -----END PGP SIGNATURE----- --nextPart1707284.FPnfOe0uiD-- -- gentoo-user@gentoo.org mailing list