I thing I found a prob: In /etc/shrc , there is a line that sets PS1 (I am hacking on that). Is it possible to chance or remove that? Comment out?
I have PS1 set in .kshrc ... On Fri, Jul 10, 2026 at 2:06 PM Steve Rikli <[email protected]> wrote: > > On Fri, Jul 10, 2026 at 12:15:38PM -0400, Todd Gruhn wrote: > > I checked /etc/passwd : > > root:*: . . .:/bin/ksh > > That indicates your root login is already using ksh, so that's the shell > you'll be in if you su, eg. > > $ su > Password: > # echo $SHELL > /bin/ksh > > > In /root ; dont have .ksh ; need to make that? > > You don't strictly need .kshrc just to use ksh; that file (and others) > is used to customize the shell settings and behavior to your taste. Note > that ksh will also source ~/.profile and the system-wide /etc/profile > files. The man page can help explain the behavior. > > I haven't regularly used Ksh in quite a while but it's not hard to find > docs and examples online about Ksh and .kshrc along with the default > NetBSD ksh(1) man page. > > On Fri, Jul 10, 2026 at 12:17:53PM -0400, Todd Gruhn wrote: > > IN /etc/passwd.BAK : > > root:*: ... /bin/sh > > > > Did I mess this up? > > No. /etc/passwd.BAK is presumably a backup copy of /etc/passwd. It's not > typically used in normal activity. > > If you didn't create it yourself you may want to compare them JIC, eg. > > diff /etc/passwd.BAK /etc/passwd > > If this is a system someone else setup, they may have simply made a copy > before changing things. > > > > On Thu, Jul 9, 2026 at 11:47 PM Steve Rikli <[email protected]> wrote: > > > On Thu, Jul 09, 2026 at 10:44:04PM -0400, Todd Gruhn wrote: > > > > So, I start NetBSD or su to root, I > > > > need to do ' . ./.ksh'. > > > > > > > > Why cant I get /bin/ksh when I login? > > > > > > > > I found /etc/shrc. Does this have something > > > > to do with this? Make a /etc/kshrc ? > > > > > > Are you saying you want to login or su as root and you want the shell > > > to automatically be ksh? > > > > > > Before making any changes, you can check your system's root user shell > > > by looking at root's line in /etc/passwd . > > > > > > $ grep ^root: /etc/passwd > > > root:*:0:0:Charlie &:/root:/bin/sh > > > > > > If you really want to change this, one method is running the NetBSD > > > 'sysinst' command as root, navigate to "Config menu", then "Root shell", > > > and select the shell you prefer. > > > > > > There's no need to create /etc/kshrc to use ksh as a login shell, or > > > to run it manually from the commandline. > > > > > > E.g. if you want to temporarily switch shells from the commandline, you > > > should be able to simply type '/bin/ksh'.
