Re: Re: PR 161548
On 2012/09/25 14:03, Matthew Seaman wrote: On 24/09/2012 22:29, Jerry wrote: Is there any specific reason that this PR: 161548 is still marked as open? o 2011/10/13 bin/161548 [patch] getent(1) inconsistent treatment of IPv6 host data It simply hasn't attracted the attention of anyone with a src commit bit. Yet. There's no need to declare he4 and he6 as struct hostent, the original declaration of he is fine. So here is patch. Index: usr.bin/getent/getent.c === --- usr.bin/getent/getent.c (revision 240947) +++ usr.bin/getent/getent.c (working copy) @@ -285,6 +285,7 @@ hosts(int argc, char *argv[]) assert(argv != NULL); sethostent(1); + he = NULL; rv = RV_OK; if (argc == 2) { while ((he = gethostent()) != NULL) @@ -295,8 +296,9 @@ hosts(int argc, char *argv[]) he = gethostbyaddr(addr, IN6ADDRSZ, AF_INET6); else if (inet_pton(AF_INET, argv[i], (void *)addr) 0) he = gethostbyaddr(addr, INADDRSZ, AF_INET); - else - he = gethostbyname(argv[i]); + else if ((he = gethostbyname2(argv[i], AF_INET6)) == + NULL) + he = gethostbyname2(argv[i], AF_INET); if (he != NULL) hostsprint(he); else { Cheers, Matthew Kevin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: PR 161548
On 26/09/2012 07:27, Kevin Lo wrote: On 2012/09/25 14:03, Matthew Seaman wrote: On 24/09/2012 22:29, Jerry wrote: Is there any specific reason that this PR: 161548 is still marked as open? o 2011/10/13 bin/161548 [patch] getent(1) inconsistent treatment of IPv6 host data It simply hasn't attracted the attention of anyone with a src commit bit. Yet. There's no need to declare he4 and he6 as struct hostent, the original declaration of he is fine. So here is patch. Index: usr.bin/getent/getent.c === --- usr.bin/getent/getent.c (revision 240947) +++ usr.bin/getent/getent.c (working copy) @@ -285,6 +285,7 @@ hosts(int argc, char *argv[]) assert(argv != NULL); sethostent(1); + he = NULL; rv = RV_OK; if (argc == 2) { while ((he = gethostent()) != NULL) @@ -295,8 +296,9 @@ hosts(int argc, char *argv[]) he = gethostbyaddr(addr, IN6ADDRSZ, AF_INET6); else if (inet_pton(AF_INET, argv[i], (void *)addr) 0) he = gethostbyaddr(addr, INADDRSZ, AF_INET); - else - he = gethostbyname(argv[i]); + else if ((he = gethostbyname2(argv[i], AF_INET6)) == + NULL) + he = gethostbyname2(argv[i], AF_INET); if (he != NULL) hostsprint(he); else { Not so. Hosts frequently have both IPv6 and IPv4 addresses: your patch would print only the IPv6 address in that case. Cheers, Matthew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Re: PR 161548
On 2012/09/26 16:44, Matthew Seaman wrote: On 26/09/2012 07:27, Kevin Lo wrote: On 2012/09/25 14:03, Matthew Seaman wrote: On 24/09/2012 22:29, Jerry wrote: Is there any specific reason that this PR: 161548 is still marked as open? o 2011/10/13 bin/161548 [patch] getent(1) inconsistent treatment of IPv6 host data It simply hasn't attracted the attention of anyone with a src commit bit. Yet. There's no need to declare he4 and he6 as struct hostent, the original declaration of he is fine. So here is patch. Index: usr.bin/getent/getent.c === --- usr.bin/getent/getent.c (revision 240947) +++ usr.bin/getent/getent.c (working copy) @@ -285,6 +285,7 @@ hosts(int argc, char *argv[]) assert(argv != NULL); sethostent(1); + he = NULL; rv = RV_OK; if (argc == 2) { while ((he = gethostent()) != NULL) @@ -295,8 +296,9 @@ hosts(int argc, char *argv[]) he = gethostbyaddr(addr, IN6ADDRSZ, AF_INET6); else if (inet_pton(AF_INET, argv[i], (void *)addr) 0) he = gethostbyaddr(addr, INADDRSZ, AF_INET); - else - he = gethostbyname(argv[i]); + else if ((he = gethostbyname2(argv[i], AF_INET6)) == + NULL) + he = gethostbyname2(argv[i], AF_INET); if (he != NULL) hostsprint(he); else { Not so. Hosts frequently have both IPv6 and IPv4 addresses: your patch would print only the IPv6 address in that case. Err, right. I committed your patch, thanks. Cheers, Matthew Kevin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
FreeBSD 8.x sysisntall dists
Hi All, I performed a `make release` with FreeBSD 8.3p4 sources that built a secondary kernel (called DEBUG). It ended up in the release inside kernels/ as expected. The install.cfg file includes the line: dists=base kernels GENERIC SMP DEBUG doc catpages DEBUG was added to the above along with the new release build. All distributions get installed with the exception of DEBUG. In looking through sysinstall sources (I am not much of a C programmer to begin with) and it appears as though the sources need to be modified to support a new DEBUG distribution. I wonder if you might be able to confirm or refute this... -- Take care Rick Miller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: FreeBSD 8.x sysisntall dists
-Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd- questi...@freebsd.org] On Behalf Of Rick Miller Sent: Wednesday, September 26, 2012 11:29 AM To: FreeBSD Questions Subject: FreeBSD 8.x sysisntall dists Hi All, I performed a `make release` with FreeBSD 8.3p4 sources that built a secondary kernel (called DEBUG). It ended up in the release inside kernels/ as expected. The install.cfg file includes the line: dists=base kernels GENERIC SMP DEBUG doc catpages DEBUG was added to the above along with the new release build. All distributions get installed with the exception of DEBUG. In looking through sysinstall sources (I am not much of a C programmer to begin with) and it appears as though the sources need to be modified to support a new DEBUG distribution. I wonder if you might be able to confirm or refute this... I'll take this. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: FreeBSD 8.x sysisntall dists
-Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd- questi...@freebsd.org] On Behalf Of Rick Miller Sent: Wednesday, September 26, 2012 11:29 AM To: FreeBSD Questions Subject: FreeBSD 8.x sysisntall dists Hi All, I performed a `make release` with FreeBSD 8.3p4 sources that built a secondary kernel (called DEBUG). It ended up in the release inside kernels/ as expected. The install.cfg file includes the line: dists=base kernels GENERIC SMP DEBUG doc catpages DEBUG was added to the above along with the new release build. All distributions get installed with the exception of DEBUG. In looking through sysinstall sources (I am not much of a C programmer to begin with) and it appears as though the sources need to be modified to support a new DEBUG distribution. I wonder if you might be able to confirm or refute this... Confirmed. I'll raise a PR with a patch to correct this. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD 8.x sysisntall dists
dists=base kernels GENERIC SMP DEBUG doc catpages DEBUG was added to the above along with the new release build. All distributions get installed with the exception of DEBUG. In looking through sysinstall sources (I am not much of a C programmer to begin with) and it appears as though the sources need to be modified to support a new DEBUG distribution. I wonder if you might be able to confirm or refute this... Confirmed. I'll raise a PR with a patch to correct this. Awesome! Thanks for the quick reply, Devin! If you don't mind, will you pass on the PR so I can track it? I am also considering approaching one of our developers to ask if they can write a patch, would that be helpful? -- Take care Rick Miller ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: FreeBSD 8.x sysisntall dists
-Original Message- From: vrwmil...@gmail.com [mailto:vrwmil...@gmail.com] On Behalf Of Rick Miller Sent: Wednesday, September 26, 2012 11:47 AM To: dte...@freebsd.org Cc: FreeBSD Questions Subject: Re: FreeBSD 8.x sysisntall dists dists=base kernels GENERIC SMP DEBUG doc catpages DEBUG was added to the above along with the new release build. All distributions get installed with the exception of DEBUG. In looking through sysinstall sources (I am not much of a C programmer to begin with) and it appears as though the sources need to be modified to support a new DEBUG distribution. I wonder if you might be able to confirm or refute this... Confirmed. I'll raise a PR with a patch to correct this. Awesome! Thanks for the quick reply, Devin! If you don't mind, will you pass on the PR so I can track it? Sure, no prob. It should appear in GNATS within 15-20 minutes. I'll get you the PR number when I get my response from GNATS. I am also considering approaching one of our developers to ask if they can write a patch, would that be helpful? No need. Patch is already written. I'll be submitting it to my mentor for review/approval shortly. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: FreeBSD 8.x sysisntall dists
-Original Message- From: Devin Teske [mailto:devin.te...@fisglobal.com] Sent: Wednesday, September 26, 2012 12:04 PM To: 'Rick Miller'; dte...@freebsd.org Cc: 'FreeBSD Questions' Subject: RE: FreeBSD 8.x sysisntall dists -Original Message- From: vrwmil...@gmail.com [mailto:vrwmil...@gmail.com] On Behalf Of Rick Miller Sent: Wednesday, September 26, 2012 11:47 AM To: dte...@freebsd.org Cc: FreeBSD Questions Subject: Re: FreeBSD 8.x sysisntall dists dists=base kernels GENERIC SMP DEBUG doc catpages DEBUG was added to the above along with the new release build. All distributions get installed with the exception of DEBUG. In looking through sysinstall sources (I am not much of a C programmer to begin with) and it appears as though the sources need to be modified to support a new DEBUG distribution. I wonder if you might be able to confirm or refute this... Confirmed. I'll raise a PR with a patch to correct this. Awesome! Thanks for the quick reply, Devin! If you don't mind, will you pass on the PR so I can track it? Sure, no prob. It should appear in GNATS within 15-20 minutes. I'll get you the PR number when I get my response from GNATS. bin/172096: sysinstall does not support new DEBUG kernel distribution in 8.x I am also considering approaching one of our developers to ask if they can write a patch, would that be helpful? No need. Patch is already written. I'll be submitting it to my mentor for review/approval shortly. Submitted. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD 8.x sysisntall dists
Confirmed. I'll raise a PR with a patch to correct this. Awesome! Thanks for the quick reply, Devin! If you don't mind, will you pass on the PR so I can track it? Sure, no prob. It should appear in GNATS within 15-20 minutes. I'll get you the PR number when I get my response from GNATS. bin/172096: sysinstall does not support new DEBUG kernel distribution in 8.x I am also considering approaching one of our developers to ask if they can write a patch, would that be helpful? No need. Patch is already written. I'll be submitting it to my mentor for review/approval shortly. Submitted. Excellent, thanks! ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: FreeBSD 8.x sysisntall dists
-Original Message- From: vrwmil...@gmail.com [mailto:vrwmil...@gmail.com] On Behalf Of Rick Miller Sent: Wednesday, September 26, 2012 1:06 PM To: dte...@freebsd.org Cc: FreeBSD Questions Subject: Re: FreeBSD 8.x sysisntall dists Confirmed. I'll raise a PR with a patch to correct this. Awesome! Thanks for the quick reply, Devin! If you don't mind, will you pass on the PR so I can track it? Sure, no prob. It should appear in GNATS within 15-20 minutes. I'll get you the PR number when I get my response from GNATS. bin/172096: sysinstall does not support new DEBUG kernel distribution in 8.x I am also considering approaching one of our developers to ask if they can write a patch, would that be helpful? No need. Patch is already written. I'll be submitting it to my mentor for review/approval shortly. Submitted. Excellent, thanks! Patch was approved. PR should be closed within the hour. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: FreeBSD 8.x sysisntall dists
-Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd- questi...@freebsd.org] On Behalf Of dte...@freebsd.org Sent: Wednesday, September 26, 2012 1:10 PM To: 'Rick Miller'; dte...@freebsd.org Cc: 'FreeBSD Questions' Subject: RE: FreeBSD 8.x sysisntall dists -Original Message- From: vrwmil...@gmail.com [mailto:vrwmil...@gmail.com] On Behalf Of Rick Miller Sent: Wednesday, September 26, 2012 1:06 PM To: dte...@freebsd.org Cc: FreeBSD Questions Subject: Re: FreeBSD 8.x sysisntall dists Confirmed. I'll raise a PR with a patch to correct this. Awesome! Thanks for the quick reply, Devin! If you don't mind, will you pass on the PR so I can track it? Sure, no prob. It should appear in GNATS within 15-20 minutes. I'll get you the PR number when I get my response from GNATS. bin/172096: sysinstall does not support new DEBUG kernel distribution in 8.x I am also considering approaching one of our developers to ask if they can write a patch, would that be helpful? No need. Patch is already written. I'll be submitting it to my mentor for review/approval shortly. Submitted. Excellent, thanks! Patch was approved. PR should be closed within the hour. All patched. http://svn.freebsd.org/changeset/base/240972 Can you test? I'll close the PR upon success. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How to use subversion to keep source, system and doc files up to date?
I see that CVS is being phased out in favor of subversion. I follow the documentation to keep my system up to date by doing: # cd /usr/src # make buildworld # make buildkernel # make installkernel # shutdown -r now and then... # mount -u / # mount -a -t ufs # adjkerntz -i # mergemaster -p # cd /usr/src # make installworld # mergemaster # reboot I've pre-populated my /usr/ports, /usr/src and /usr/src/sys directories when I installed my system. I've installed subversion from package, I want to follow the Stable (same as Patch, right?) branch, and I'm struggling how to best use subversion to update my kernel source, system files, documentation, etc., so I can keep my system up to date. Can someone tell me how to use subversion to keep my /usr/ports, /usr/src and /usr/src/sys directories up to date? Thank you, Ed ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to use subversion to keep source, system and doc files up to date?
On Wed, 26 Sep 2012 14:12:34 -0700, Ed Flecko wrote: I see that CVS is being phased out in favor of subversion. I follow the documentation to keep my system up to date by doing: # cd /usr/src # make buildworld # make buildkernel # make installkernel # shutdown -r now and then... # mount -u / # mount -a -t ufs # adjkerntz -i # mergemaster -p # cd /usr/src # make installworld # mergemaster # reboot Compare this again to the comment header of /usr/src/Makefile, but looks valid (even though few cleanup steps are missing). I've installed subversion from package, I want to follow the Stable (same as Patch, right?) branch, and I'm struggling how to best use subversion to update my kernel source, system files, documentation, etc., so I can keep my system up to date. No, -STABLE and -RELEASE-plevel are different things. While -STABLE is a development branch that has incorporated things that have been considered stable on the continuous work toward a new version (that's from -CURRENT), -RELEASE-plevel only contains security patches for that release: this is what you get when using the binary method of updating, using freebsd-update. The -CURRENT (or -HEAD) is the active devlopment branch from which good things are passed to -STABLE. That branch is considered experimental. If you want to follow the -RELEASE-plevel way, why not simply use freebsd-update, especially if you're _not_ running a custom kernel (as concluded from your commands example shown above)? Can someone tell me how to use subversion to keep my /usr/ports, /usr/src and /usr/src/sys directories up to date? /usr/src and /usr/src/sys are no distinct subtrees, i. e. /usr/src/sys is a component of /usr/src. It's only different from /usr/ports. Using the old CVS approach, both can be updated with the same program (csup). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
10Gb SFP+ recomendations?
I'm looking for a reasonable 10Gb SFP+ capable board supported under RELENG_9. All I need is one port that will be plugged into a Cisco C3KX-NM-10G. It's going into a Supermicro chassis. Any recomendations? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 10Gb SFP+ recomendations?
On Wed, Sep 26, 2012 at 3:23 PM, Dennis Glatting d...@pki2.com wrote: I'm looking for a reasonable 10Gb SFP+ capable board supported under RELENG_9. All I need is one port that will be plugged into a Cisco C3KX-NM-10G. It's going into a Supermicro chassis. Any recomendations? I have had good success running Intel 10gig NICs supported by ixgbe(1) on 8.x systems. I see no reason as to why they would not work on 9.x as well. -pete -- pete wright www.nycbug.org @nomadlogicLA ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to use subversion to keep source, system and doc files up to date?
Thank you. I am using a custom kernel, but you're right - I should have said so. :-) Do you have any feedback using subversion? I know I can still use csup; I'm basically trying to figure out how to subversion to achieve the same result. Ed ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
RE: 10Gb SFP+ recomendations?
-Original Message- From: owner-freebsd-questi...@freebsd.org [mailto:owner-freebsd- questi...@freebsd.org] On Behalf Of Dennis Glatting Sent: Wednesday, September 26, 2012 3:23 PM To: questi...@freebsd.org Subject: 10Gb SFP+ recomendations? I'm looking for a reasonable 10Gb SFP+ capable board supported under RELENG_9. All I need is one port that will be plugged into a Cisco C3KX-NM-10G. It's going into a Supermicro chassis. Any recomendations? Broadcom NetXtreme 10G FC HBA with vendor ID 14e4 and model ID 164f governed by the bxe(4) driver. Support is in 9.0-R and later. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to use subversion to keep source, system and doc files up to date?
While I track CURRENT, not STABLE, the process should not be significantly different. Here is what I do. * Ed Flecko edfle...@gmail.com [2012-09-26 17:18 -0400]: I follow the documentation to keep my system up to date by doing: Here I update the src tree. # svn update /usr/src/ # cd /usr/src # make buildworld # make buildkernel # make installkernel # shutdown -r now and then... # mount -u / Here, instead of # mount -a -t ufs I use # zfs mount -a. # adjkerntz -i [...] # reboot * Ed Flecko edfle...@gmail.com [2012-09-26 18:50 -0400]: Do you have any feedback using subversion? I know I can still use csup; I'm basically trying to figure out how to subversion to achieve the same result. For ports, I do the following. # svn update /usr/ports/ # cd /usr/ports # make fetchindex # pkg_version -l '' Then update any ports which need updating. There is, AFAICT, minimal difference between what I used to do with csup, and what I do now with svn. Of course, the first time I used subversion was doing this... so I may be doing it wrong. ;) HTH, -- dave [ please don't CC me ] pgpAF88Kvjn45.pgp Description: PGP signature
bad root shell in /etc/passwd
I mistakenly changed the root shell to something which doesn't exist. Was trying to make it bash and used /bin/bash instead of /usr/local/bin/bash. As a consequence, all login attempts fail because the shell can't be found. Unfortunatley, I shut down the session in which I modified /etc/passwd and I don't have a root shell running anywhere, so I can't fix it. I'm concerned that booting single user will have the same problem. Or will it fall back to /bin/sh? guidance? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: bad root shell in /etc/passwd
On Sep 26, 2012, at 6:06 PM, Gary Aitken wrote: I mistakenly changed the root shell to something which doesn't exist. Was trying to make it bash and used /bin/bash instead of /usr/local/bin/bash. As a consequence, all login attempts fail because the shell can't be found. Unfortunatley, I shut down the session in which I modified /etc/passwd and I don't have a root shell running anywhere, so I can't fix it. I'm concerned that booting single user will have the same problem. Or will it fall back to /bin/sh? guidance? Single-user mode will prompt you. The default is /bin/sh but you can change it. You should be able to solve the problem by entering single-user mode. -- Devin _ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: bad root shell in /etc/passwd
On Wed, 26 Sep 2012 19:06:18 -0600, Gary Aitken wrote: I mistakenly changed the root shell to something which doesn't exist. Was trying to make it bash and used /bin/bash instead of /usr/local/bin/bash. A typical Linuxism. :-) As a consequence, all login attempts fail because the shell can't be found. That's why you should be using the toor account and leave root unchanged. Some may say that as soon as you're changing the root shell because you're doing much work as root, you're obvuously doing something wrong. :-) Also note that tools like su (su -m, su -) and super are in many cases better suited for making the CLI environment more comfortable than changing the shell of the root account. Unfortunatley, I shut down the session in which I modified /etc/passwd and I don't have a root shell running anywhere, so I can't fix it. Maybe without rebooting you can do this: Enter su -m (if your non-root user is allowed to su root, then enter chsh and set the root shell back to the default. I'm concerned that booting single user will have the same problem. When you can successfully boot into SUM, you will be prompted for the shell to start. /bin/sh is the default shell (even though it is a quite ugly dialog shell -- still it's considered a maintenance and emergency use only shell at this point. It will be powerful enough to call the chsh command to get root back into normal condition. Or will it fall back to /bin/sh? No, you will be prompted for the shell to be executed. guidance? Try the su -m trick first. If it doesn't work: Reboot into SUM, and at the Enter full pathname of shell or RETURN for /bin/sh: prompt, press RETURN. In worst case (e. g. if you have accidentally damaged /bin/sh, maybe by overwriting it with a dynamically linked bash), you could type /rescue/sh instead. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: bad root shell in /etc/passwd
On 9/26/2012 9:06 PM, Gary Aitken wrote: Probably not. Just boot a livecd that supports your HBA and FS, mount your Root FS, and: # vipwd -d /mnt/rootfs or mount /usr as well and: # chroot /mnt/rootfs usermod -s /usr/local/bin/bash root guidance? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Brian A. Seklecki bsekle...@probikesllc.com CE-Pro Bikes, LLC 412-378-3823 (m) PGP Key Available Upon Request ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: bad root shell in /etc/passwd
Thanks, all. On 09/26/12 19:18, Polytropon wrote: On Wed, 26 Sep 2012 19:06:18 -0600, Gary Aitken wrote: I mistakenly changed the root shell to something which doesn't exist. Was trying to make it bash and used /bin/bash instead of /usr/local/bin/bash. A typical Linuxism. :-) Never run on one enough to learn any of those. It's a dumbism, too-fast-with-the-fingersism, slow-functioning-brainism... That's why you should be using the toor account and leave root unchanged. I realized that about the time I learned I had given root to a bad shell path; at which time I also realized I hadn't given toor a pw. Some may say that as soon as you're changing the root shell because you're doing much work as root, you're obvuously doing something wrong. :-) A (too) faint voice in the back of my head was saying that... Also note that tools like su (su -m, su -) and super are in many cases better suited for making the CLI environment more comfortable than changing the shell of the root account. That's what I usually do, but I was (am) having trouble getting .shrc to actually take. Was modifying passwd to fix my own account, and decided to fix root at the same time -- I had changed it to csh and didn't think that was a good idea. At first changed it back to /bin/sh, and then decided to try bash as it should be a super-set. Although I think that is probably unwise. Maybe without rebooting you can do this: Enter su -m (if your non-root user is allowed to su root, then enter chsh and set the root shell back to the default. su -m won't work because of the bad shell As a security precaution, if the target user's shell is a non-standard shell (as defined by getusershell(3)) and the caller's real uid is non- zero, su will fail. When you can successfully boot into SUM, you will be prompted for the shell to start. /bin/sh is the default shell (even though it is a quite ugly dialog shell -- still it's considered a maintenance and emergency use only shell at this point. It will be powerful enough to call the chsh command to get root back into normal condition. chsh and vipw won't work from SUM until you mount /usr, which fortunately was all intact. back on the road again, thanks, Gary ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: bad root shell in /etc/passwd
On Wed, 26 Sep 2012 22:07:26 -0600, Gary Aitken wrote: Thanks, all. On 09/26/12 19:18, Polytropon wrote: That's why you should be using the toor account and leave root unchanged. I realized that about the time I learned I had given root to a bad shell path; at which time I also realized I hadn't given toor a pw. The toor account will be locked until put into use, so no security risk. Maybe without rebooting you can do this: Enter su -m (if your non-root user is allowed to su root, then enter chsh and set the root shell back to the default. su -m won't work because of the bad shell As a security precaution, if the target user's shell is a non-standard shell (as defined by getusershell(3)) and the caller's real uid is non- zero, su will fail. Ah okay, I didn't check that security feature in particular. As su -m usually continues the current user shell, as described for the -m option: Leave the environment unmodified. The invoked shell is your login shell, and no directory changes are made. Immediately followed by the restriction you quoted. :-) When you can successfully boot into SUM, you will be prompted for the shell to start. /bin/sh is the default shell (even though it is a quite ugly dialog shell -- still it's considered a maintenance and emergency use only shell at this point. It will be powerful enough to call the chsh command to get root back into normal condition. chsh and vipw won't work from SUM until you mount /usr, which fortunately was all intact. That's correct, those are located in /usr/bin (which _may_ be on a separate partition that requires mounting before use). Depending on how $EDITOR is set (_if_ it should be set somehow), the availability of this editor (default: /usr/bin/vi) will decide about the functionality of the vipw or chsh commands. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
trouble getting .shrc to take
Having set my shell to either sh or bash, I can't seem to get .shrc to take. If I have a .shrc that looks like: PROMPT_DIRTRIM=3; export PROMPT_DIRTRIM PS1=\\w$ ; export PS1 PS1 is not defined when I log in, and the prompt is set to the default instead. If I do ./.shrc nothing seems to change; although executing the above commands from the shell itself works. What am I missing? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: trouble getting .shrc to take
On Wed, 26 Sep 2012 23:08:27 -0600, Gary Aitken wrote: Having set my shell to either sh or bash, I can't seem to get .shrc to take. If I have a .shrc that looks like: PROMPT_DIRTRIM=3; export PROMPT_DIRTRIM PS1=\\w$ ; export PS1 PS1 is not defined when I log in, and the prompt is set to the default instead. If I do ./.shrc nothing seems to change; although executing the above commands from the shell itself works. What am I missing? As far as I see from man sh, the system's shell does not support PROMPT_DIRTRIM, so it's a bash feature. According to man bash, its initialisation file is called ~/.bashrc. For example, if I put export PS1=\u@\h:\w\$ into ~/.bashrc and execute bash, I get a standard prompt. So it should only be a matter of the correct file name. Note that bash has several files it can process at startup time, such as .bash_login, .profile and .bashrc. Their order is described in the manual, e. g. When bash is invoked as an interactive login shell, or as a non-inter- active shell with the --login option, it first reads and executes com- mands from the file /etc/profile, if that file exists. After reading that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. When an interactive shell that is not a login shell is started, bash reads and executes commands from ~/.bashrc, if that file exists. This may be inhibited by using the --norc option. The --rcfile file option will force bash to read and execute commands from file instead of ~/.bashrc. You can find more information in the INVOCATION section of the manual at man bash. There are files for per-user configuration as well as system-wide files. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org