From owner-freebsd-questions@freebsd.org Tue May 18 19:58:41 2021 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 916246562AD for ; Tue, 18 May 2021 19:58:41 +0000 (UTC) (envelope-from tomek@cedro.info) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fl6JJ6fFNz4mPv for ; Tue, 18 May 2021 19:58:40 +0000 (UTC) (envelope-from tomek@cedro.info) Received: by mail-ej1-x629.google.com with SMTP id n2so16470921ejy.7 for ; Tue, 18 May 2021 12:58:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cedro.info; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=hHSPRMrH/92EO+Bzd3HTe2ZbmVVe/z9MQqbT/ry6uMw=; b=UWJeTfSs7JTngh87WoJsQaTf5IcSNNjr65CtcKFpZ32KYH4DM7PCnXbgm25//8HoDX oviRcxAaJ1WCnVhBVpz7y4tnk+w+K7tHk8EgUo5AhFKlPjbXRBsDsCNeFRsIO0Gicz5Q eTuMPT0jK8PDyQ6SCjXRl0k3Bwm80iU7/XmNO4N8g5GLxb3CJ9dnz8YWoxc1ObTPCsrW ykxvlpO4Y8qkNPdn2S4wvsdz1hlqVfc40OWUxsmHpIK3JB9VZoRFrHSQxmrM0Dcvfxbb 4/219Vv45D08HdPrzbDmH2Znddj0mbQE9Omah2mFndyLyLnq/D95kbMIFfiWMCmB6hky wl9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=hHSPRMrH/92EO+Bzd3HTe2ZbmVVe/z9MQqbT/ry6uMw=; b=gM8/xdLVvxENljKqwaZ3HtEJZfjJSpXH8uaji7aHiu6+YHW65dSOdTcwQQ1mTGM/iO cD3soBxlGzwZfXA6IueHsdA+mb09kJD3X5OptjFpc21U+XQxXzP8Oxz6jWdMzCac42ee CjqJl4Q+qF7AajpNgMKaGXBfb8CYZQKPzCb5WQBQpe0F43/1OFlKszZOJrSw9Lqokn4k 3dlYe/c3fMTJbrDZ2zFqiA9Np40BKgf/IzmOd/o8IWnp8H9gwPAxFZ99wlcMyPxod7Fq JC338BdW9Z9ahgOF8OtyVRvtYrz5TXeLbE/KGtkV9ySkPnIeqk/uYaDscLBz+7jJuBxT itgA== X-Gm-Message-State: AOAM530EaLfRCRI5OoLUbIjHginkEU4HhPNLK42zgRasFUoYRvJK+kQ1 +qzZJOJNBrJWRSG+GfAurGU/ptSQyjeLiSKK1Zao4A== X-Google-Smtp-Source: ABdhPJwKRzp91ZDp9Yh/qE36jQXdCJ7En4Ygdl7/rfr7jWHYtO0piD6FpEr4GO/JghyfKdJEi+wWd8LCdQCPdvFmgmc= X-Received: by 2002:a17:906:e281:: with SMTP id gg1mr7678142ejb.463.1621367918007; Tue, 18 May 2021 12:58:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Tomasz CEDRO Date: Tue, 18 May 2021 21:58:19 +0200 Message-ID: Subject: Re: Can non-root user create/start services? To: K Lu Cc: FreeBSD Questions Mailing List Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4Fl6JJ6fFNz4mPv X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cedro.info header.s=google header.b=UWJeTfSs; dmarc=none; spf=none (mx1.freebsd.org: domain of tomek@cedro.info has no SPF policy when checking 2a00:1450:4864:20::629) smtp.mailfrom=tomek@cedro.info X-Spamd-Result: default: False [-0.27 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[cedro.info:s=google]; NEURAL_HAM_MEDIUM(-0.97)[-0.968]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::629:from]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; DMARC_NA(0.00)[cedro.info]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::629:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[cedro.info:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::629:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_SPAM_LONG(0.99)[0.994]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 May 2021 19:58:41 -0000 On Tue, May 18, 2021 at 9:47 PM K Lu wrote: > And I'm more curious about the general question of "how can a non-root user create/start freebsd services" - Any suggestions :) Why would you like that? You can set services to start in /etc/rc.conf as root ans just have them running (with provided parameters). You can run your own network services on non-restricted ports (above 1024) as standard user. You can also use sudo to perform root actions as standard user. In general Unix always separates root (administrator tasks) from users (non administrative tasks). This is why "gaining root" as standard/restricted user is always the most interesting part ;-) -- CeDeROM, SQ7MHZ, http://www.tomek.cedro.info