From owner-freebsd-questions@FreeBSD.ORG Thu Dec 6 15:54:08 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BAAC63EB for ; Thu, 6 Dec 2012 15:54:08 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from st11p05mm-asmtp002.mac.com (st11p05mm-asmtpout002.mac.com [17.172.108.237]) by mx1.freebsd.org (Postfix) with ESMTP id 81DA68FC12 for ; Thu, 6 Dec 2012 15:54:08 +0000 (UTC) MIME-version: 1.0 Content-type: text/plain; charset=windows-1252 Received: from [17.153.59.91] (unknown [17.153.59.91]) by st11p05mm-asmtp002.mac.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Jan 3 2012)) with ESMTPSA id <0MEM001B76PRGK00@st11p05mm-asmtp002.mac.com> for freebsd-questions@freebsd.org; Thu, 06 Dec 2012 14:53:56 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8185,1.0.431,0.0.0000 definitions=2012-12-06_04:2012-12-06,2012-12-06,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 suspectscore=18 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=6.0.2-1203120001 definitions=main-1212060093 Subject: Re: Login class and limit From: Charles Swiger In-reply-to: <20121206143201.GB42583@vagner-wrk.bsdway.ru> Date: Thu, 06 Dec 2012 06:53:50 -0800 Content-transfer-encoding: quoted-printable Message-id: <37A52274-D877-4AED-82F3-CF058DEC9DBE@mac.com> References: <20121206143201.GB42583@vagner-wrk.bsdway.ru> To: Vagner X-Mailer: Apple Mail (2.1499) Cc: FreeBSD questions Mail List X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2012 15:54:08 -0000 Hi-- On Dec 6, 2012, at 6:32 AM, Vagner wrote: > Hi all! > I need help configuring limits for users at FreeBSD 8.3. > I set next options and parametrs at login.conf(5): [ =85 ] >=20 >> # sudo -u daemon limits >> Resource limits (current): >> cputime infinity secs >=20 > but: >=20 >> # su - daemon -c 'limits' >> Resource limits (current): >> cputime 5 secs >=20 > Why? And how can i running process without su(1) to apply limits for > my user class? "su -", "su -l", and "sudo -i" provide a login shell, which gets the limits setup by login.conf. Normally daemons are started at boot via rc mechanism (or perhaps get spawned from inetd) and do not have a login shell associated with them to setup the limits. Either use one of the su/sudo flavors I mention above, or "/bin/sh -l" to provide a login env to the process=85 Regards, --=20 -Chuck