From owner-freebsd-questions@freebsd.org Mon Oct 21 15:52:18 2019 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 EF3D515A89A for ; Mon, 21 Oct 2019 15:52:18 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (enterprise.ximalas.info [IPv6:2001:700:1100:1::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ximalas.info", Issuer "Hostmaster ximalas.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 46xh3P55Q5z4Q01 for ; Mon, 21 Oct 2019 15:52:17 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (Ximalas@localhost [127.0.0.1]) by enterprise.ximalas.info (8.15.2/8.15.2) with ESMTPS id x9LFqAga082861 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO) for ; Mon, 21 Oct 2019 17:52:10 +0200 (CEST) (envelope-from trond.endrestol@ximalas.info) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ximalas.info; s=default; t=1571673130; bh=v5uXIXFicQmTKj140J7UJYtCFK3DKPBDzjc6LLb5+9o=; h=Date:From:To:Subject:In-Reply-To:References; b=LtV8tXEEBnAg67MF7TB392J9V88IBgtgRpeSGiLPaEybMt6yJTyEWNiycjX8JZAwL KcTgofrvEMsDZ1vh6alh5C2Flx24gsDBPo+qKycWhP/OKSC8C9lSY0drLVANwqA3Ba kQLsLX9EnvGBRuu4+XIBOdK9crJT8mWDno73SPnKCni7LWDwkIg1fVEzxjgtnYAT0p mXxmo1HCdjS/2aUi6J/vEYSRP6HVLK7uGUPgpwEbBROkoFnoF4HM4l+0d+mlz++Khs dEQAbV4WpR4yly7kskBu14r0P95BYlROzrtS2J0YK0UzezsekqgP3Lfg2jmN5mi23R EeX+aPEMdiGcw== Received: from localhost (trond@localhost) by enterprise.ximalas.info (8.15.2/8.15.2/Submit) with ESMTP id x9LFq9f1082855 for ; Mon, 21 Oct 2019 17:52:09 +0200 (CEST) (envelope-from trond.endrestol@ximalas.info) X-Authentication-Warning: enterprise.ximalas.info: trond owned process doing -bs Date: Mon, 21 Oct 2019 17:52:09 +0200 (CEST) From: =?UTF-8?Q?Trond_Endrest=C3=B8l?= Sender: Trond.Endrestol@ximalas.info To: freebsd-questions@freebsd.org Subject: Re: BE and loader integration In-Reply-To: <20191021154445.GA77867@admin.sibptus.ru> Message-ID: References: <20191021083145.GA40656@admin.sibptus.ru> <20191021093319.GA42604@admin.sibptus.ru> <20191021102002.GA45885@admin.sibptus.ru> <20191021154445.GA77867@admin.sibptus.ru> User-Agent: Alpine 2.21.99999 (BSF 352 2019-06-22) OpenPGP: url=http://ximalas.info/about/tronds-openpgp-public-key MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on enterprise.ximalas.info X-Rspamd-Queue-Id: 46xh3P55Q5z4Q01 X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ximalas.info header.s=default header.b=LtV8tXEE; dmarc=pass (policy=none) header.from=ximalas.info; spf=pass (mx1.freebsd.org: domain of trond.endrestol@ximalas.info designates 2001:700:1100:1::8 as permitted sender) smtp.mailfrom=trond.endrestol@ximalas.info X-Spamd-Result: default: False [-3.93 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[ximalas.info:s=default]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+a:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; HAS_XAW(0.00)[]; DKIM_TRACE(0.00)[ximalas.info:+]; CTYPE_MIXED_BOGUS(1.00)[]; DMARC_POLICY_ALLOW(-0.50)[ximalas.info,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:224, ipnet:2001:700::/32, country:NO]; IP_SCORE(-1.93)[ip: (-7.99), ipnet: 2001:700::/32(-1.04), asn: 224(-0.59), country: NO(-0.01)] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2019 15:52:19 -0000 On Mon, 21 Oct 2019 22:44+0700, Victor Sudakov wrote: > Trond Endrestøl wrote: > > > > > BTW the boot menu BE selection does not work properly anyway. I've found some > > > combinations of BEs and loader options which lead to an unbootable > > > system: http://admin.sibptus.ru/~vas/bad_be.png > > > Maybe it's sysutils/beadm's fault incorrectly creating BEs, whatever. > > > > For some reason /dev failed to mount. Normally, the kernel > > automatically mounts / read-only and /dev read-write. The former is > > upgraded to read-write by the rc scripts during multiuser boot. > > I think I know the reason: it's several BEs trying to mount on top of > one another, again. I've seen this already in the pre-zfsbe times. > > > > > It could be a bug in 11.3. > > It actually seems that the bug > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208601 is not really > fixed. > > > > > The menus are somewhat improved in stable/12 and head. Here are some > > screenshots from a VM I just booted, it runs head from February(!): > > > > https://ximalas.info/~trond/FreeBSD-head-BE-menu-2019-feb/ > > Yes, it looks more logical though the BE punches the Daemon in the nose. > > > > > That dark blue colour is my only complaint. It can be a real pain to > > read on certain terminals/video adapters. > > Do you use sysutils/beadm or sysutils/beadm-devel? No, I roll my own BEs, using: https://ximalas.info/~trond/create-zfs/canmount/create-and-populate-new-BE.sh This link is easier to view in a browser: https://ximalas.info/~trond/create-zfs/canmount/create-and-populate-new-BE.sh.txt -- Trond. From owner-freebsd-questions@freebsd.org Mon Oct 21 17:35:46 2019 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 D53FB15C670 for ; Mon, 21 Oct 2019 17:35:46 +0000 (UTC) (envelope-from louisk@cryptomonkeys.org) Received: from mail.cryptomonkeys.com (mail.louiskphoto.com [174.136.98.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46xkLn6857z4Tyq for ; Mon, 21 Oct 2019 17:35:45 +0000 (UTC) (envelope-from louisk@cryptomonkeys.org) Received: from mail.cryptomonkeys.com (localhost [127.0.0.1]) by mail.cryptomonkeys.com (Postfix) with ESMTP id 707D43E873A; Mon, 21 Oct 2019 17:35:38 +0000 (UTC) Received: from mail.cryptomonkeys.com ([127.0.0.1]) by mail.cryptomonkeys.com (mail.cryptomonkeys.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id uuh4TXE_aIyH; Mon, 21 Oct 2019 17:34:48 +0000 (UTC) Received: from ipwn.gwp.corp.flightaware.com (natpool.gwp.corp.flightaware.com [38.100.147.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.cryptomonkeys.com (Postfix) with ESMTPSA id EEEB33E87CD; Mon, 21 Oct 2019 17:34:47 +0000 (UTC) From: Louis Kowolowski Message-Id: <86F0B64D-35BA-4E01-A33B-E5BD24486AC8@cryptomonkeys.org> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\)) Subject: Re: changing the PostgreSQL default user Date: Mon, 21 Oct 2019 12:34:45 -0500 In-Reply-To: <9fdcf15e-2f83-1cfd-1e04-cc08943485fa@networktest.com> Cc: freebsd-questions@freebsd.org To: David Newman References: <9fdcf15e-2f83-1cfd-1e04-cc08943485fa@networktest.com> X-Rspamd-Queue-Id: 46xkLn6857z4Tyq X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of louisk@cryptomonkeys.org has no SPF policy when checking 174.136.98.10) smtp.mailfrom=louisk@cryptomonkeys.org X-Spamd-Result: default: False [-0.32 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-0.98)[-0.979,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.97)[-0.968,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[cryptomonkeys.org]; AUTH_NA(1.00)[]; URI_COUNT_ODD(1.00)[9]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:25795, ipnet:174.136.96.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.77)[ipnet: 174.136.96.0/20(-3.50), asn: 25795(-0.32), country: US(-0.05)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2019 17:35:46 -0000 roughly, you will want to do: take backup (pg_dump) add the new user to the database fix the pg_hba.conf to have the new user restart pg alter default user to new user shutdown pg remove pgsql entries from pg_hba.conf add postgres user to freebsd. use same UID so you don=E2=80=99t need to = chown anything upgrade postgres start pg you should now have pg running as new (unix) user, and you should be = able to connect as the new user delete pgsql user (nolonger needed or used) > On Oct 21, 2019, at 1:22 AM, David Newman = wrote: >=20 > Greetings. >=20 > FreeBSD recently changed its default version of PostgreSQL from 9.5 to = 11. >=20 > However, attempts to run 'pg_upgrade' on the databases failed for me > because my 9.5 install had a default user of 'pgsql' and version 11 = goes > with 'postgres' instead [1]. >=20 > My hack was to edit /usr/local/etc/rc.d/postgresql, set = postgresql_user > to pgsql, (re)run initdb, and then do the pg_upgrade conversion. It > works, but future upgrades might clobber the edit in the rc.d file. >=20 > This article suggests one ALTER command will change the default > PostgreSQL user: >=20 > = https://netnow.jira.com/wiki/spaces/PUBP/pages/119996467/Changing+the+defa= ult+user+and+password+for+postgreSQL >=20 > Is that, plus chown'ing the data directory, sufficient to effect a = name > change? >=20 > Thanks! >=20 > dn >=20 >=20 > [1] The pg_upgrade program has a -U switch to specify user, but it = still > fails because the pgsql user can't read stuff owned by the postgres = user > and vice-versa. Just running chown on either binary or data directory > and its contents doesn't work. >=20 >=20 >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org" -- Louis Kowolowski louisk@cryptomonkeys.org = Cryptomonkeys: = http://www.cryptomonkeys.com/ Making life more interesting for people since 1977