From owner-freebsd-current@FreeBSD.ORG Mon Mar 29 17:52:00 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A34A816A4CE; Mon, 29 Mar 2004 17:52:00 -0800 (PST) Received: from mx2.mail.ru (mx2.mail.ru [194.67.57.22]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FC6D43D2F; Mon, 29 Mar 2004 17:52:00 -0800 (PST) (envelope-from ghos@mail.ru) Received: from [80.78.105.209] (port=1130 helo=80.78.105.209) by mx2.mail.ru with esmtp id 1B88Q2-000FFB-00; Tue, 30 Mar 2004 05:51:58 +0400 Date: Tue, 30 Mar 2004 07:49:23 +0600 From: ghos X-Mailer: The Bat! (v2.00.6) CD5BF9353B3B7091 X-Priority: 3 (Normal) Message-ID: <142839937.20040330074923@mail.ru> To: Ganbold , freebsd-hackers@freebsd.org, freebsd-current@freebsd.org In-Reply-To: <6.0.3.0.2.20040329102508.029f5670@202.179.0.80> References: <6.0.3.0.2.20040329102508.029f5670@202.179.0.80> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam: Not detected X-Mailman-Approved-At: Tue, 30 Mar 2004 05:21:56 -0800 Subject: Re[2]: Question regarding shell user creation at login time X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ghos List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Mar 2004 01:52:00 -0000 You wrote 29 mar 2004, 8:05:55 +0500: > Hi, > I traced sshd using ktrace and it says: > ...... > 10198 new CALL setuid(0) > 10198 new RET setuid -1 errno 1 Operation not permitted > 10198 new CALL execve(0x80485d0,0xbfbfed8c,0xbfbfed94) > 10198 new NAMI "/home/new/new.pl" > 10198 new RET execve -1 errno 13 Permission denied > 10198 new CALL exit(0xffffffff) > ..... > My C program is: > #include > main(ac, av) > char **av; > { > setuid(0); > execv("/home/new/new.pl",av); > } > Directory: > public# ls -la ~new > total 46 > drwxr-xr-x 2 root wheel 512 Mar 29 09:10 . > drwxr-xr-x 8 root wheel 512 Mar 25 15:28 .. > -r--r----- 1 root new 767 Mar 24 17:43 .cshrc > -r--r----- 1 root new 248 Mar 26 12:32 .login > -r--r----- 1 root new 158 Mar 24 17:43 .login_conf > -r--r----- 1 root new 373 Mar 24 17:43 .mail_aliases > -r--r----- 1 root new 331 Mar 24 17:43 .mailrc > -r--r----- 1 root new 797 Mar 24 17:43 .profile > -r--r----- 1 root new 276 Mar 24 17:43 .rhosts > -r--r----- 1 root new 975 Mar 24 17:43 .shrc > -rwsr-x--- 1 root new 4651 Mar 26 08:47 new > ---------- 1 root wheel 94 Mar 26 08:47 new.c > -r-x------ 1 root wheel 15430 Mar 25 15:16 new.pl > -rw-r--r-- 1 root wheel 52 Mar 25 16:52 new.sh > Can somebody tell me the reason why it is failed? > Thanks in advance, > Ganbold > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to > "freebsd-hackers-unsubscribe@freebsd.org" You are not root! You are 'new' in 'new'-group. Try this: # chmod g+x ~new/new.pl