From owner-freebsd-questions@FreeBSD.ORG Mon Oct 15 23:27:10 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4469216A46B for ; Mon, 15 Oct 2007 23:27:10 +0000 (UTC) (envelope-from tuaregmex@gmail.com) Received: from el-out-1112.google.com (el-out-1112.google.com [209.85.162.180]) by mx1.freebsd.org (Postfix) with ESMTP id AFCDC13C46B for ; Mon, 15 Oct 2007 23:27:09 +0000 (UTC) (envelope-from tuaregmex@gmail.com) Received: by el-out-1112.google.com with SMTP id s27so393161ele for ; Mon, 15 Oct 2007 16:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=Dun7e+1Zs0UUhetlA7q1um6/CLBExgt6GcEyBlHxaBk=; b=F4GjDujXfXRgJcwpIRthWNKeU4SkNMdkjh0cA5BtFk44hKGezSAGuB1lX74/7OL8av93ngbwvSJmOpoTrW4x05IJRwctPWjikXu9sN0cMTQLB02rkrPeEIC/eSzf3w/H9zwMDtzyZCXTZ2BBYF8fxDxfG3+Ep0c0b2olHlctnm8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=gHN3bYpavX8OzY0Q0HJybYcHPewn1trrfAWBz/kfxu9nU0GzXcGT7+0RZZ7+W7J8LQfmoufxexPXRAzU9+QjmU1YitbGV1nuhymLqxfwTgvSrg5WwIW2D3FVnKXThE+L+FUUh3sxiQmAcjGQT3p/eeZPduGhgms62uZ3pZTXVTA= Received: by 10.142.191.2 with SMTP id o2mr1790048wff.1192490827887; Mon, 15 Oct 2007 16:27:07 -0700 (PDT) Received: by 10.143.155.5 with HTTP; Mon, 15 Oct 2007 16:27:07 -0700 (PDT) Message-ID: <7a4a15bd0710151627j791494dcs593964a9e8660730@mail.gmail.com> Date: Mon, 15 Oct 2007 18:27:07 -0500 From: Tuareg To: "FreeBSD Mailing List" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: login.access, login and su. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Oct 2007 23:27:10 -0000 Good afternoon, I need to restric the access to some accounts, we are using FreeBSD 4.10, this is the configuration for "login" in /etc/pam.conf login auth sufficient pam_skey.so login auth sufficient pam_opie.so no_fake_prompts #login auth requisite pam_opieaccess.so login auth requisite pam_cleartext_pass_ok.so #login auth sufficient pam_kerberosIV.so try_first_pass #login auth sufficient pam_krb5.so try_first_pass login auth required pam_unix.so try_first_pass login account required pam_unix.so login password required pam_permit.so login session required pam_permit.so And this is the content of /etc/login.access: -:ALL EXCEPT user user1 : ALL If we do "su - user3" in FreeBSD 4.10 the result is that we become "user3" succesfully, and no restricction message appears. % su - user3 %whoami %user3 With FreeBSD 6.1/6.2, we are able to restrict the access if the account isn't appear in /etc/login.access, for example: -:ALL EXCEPT user user1 user2 : ALL And this is the content of /etc/pamd./login: # PAM configuration for the "login" service # # auth auth required pam_nologin.so no_warn auth sufficient pam_self.so no_warn auth include system # account account requisite pam_securetty.so account include system # session session include system # password password include system If we are using the account "user" and whant to change to "user3" using "su -" this never happen: % su - user3 pam_login_access: pam_sm_acct_mgmt: user3 is not allowed to log in on /dev/ttyp0 su: Sorry Which is exactly what we need, but for FreeBSD 4.10. There are differences between 4.10 and 6.1/6.2 for the configuration of PAM and all it's modules, but the configuration for login.acces is the same. We read the documentation at the FreeBSD site about login.access and there is no difference for the sintaxis of this file. We also had read the man for login/pam/login.conf/login.access. The file "login.conf" is the same for 4.10 and 6.1/6.2, we didn't modified it's content. Is there another configuration file we are missing that should be modified to restrict the "user" become "user3" using "su -" in FreeBSD 4.10? -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments