Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Minor setup issues

1 view
Skip to first unread message

William A. Mahaffey III

unread,
Jul 15, 2015, 12:13:00 PM7/15/15
to


.... I have my shiny new NetBSD 6.1.5 server up & running, all RAID
devices working AOK, several reboots completed, swap configured, etc.
All is well except for a few pilot errors. Following recommendations I
now login to root by su, rather than directly at the console. When I do,
none of my aliases get set & filename completion using the tab key
doesn't work. This isn't huge, but is irritating. All is well logging in
at the console, although the screen is limited to 80 chars/line & 25
lines, which restricts what you can see in crowded directories. I am
ssh-ing in as my regular user, BTW, that probably makes a difference.
When fully operational, there will be no kbd/mouse/monitor hooked up, so
I do need to get this either fixed or understood. TIA & have a good one.


--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Greg Troxel

unread,
Jul 15, 2015, 1:18:52 PM7/15/15
to

"William A. Mahaffey III" <w...@hiwaay.net> writes:

> Following recommendations I now login to root by su, rather than
> directly at the console. When I do, none of my aliases get set &
> filename completion using the tab key doesn't work.

man su, see -m

install and then man sudo, see -E

I use "sudo -E $(SHELL)", more or less, to get a shell that's just like
mine, but with uid 0.

Gerard Lally

unread,
Jul 15, 2015, 4:48:17 PM7/15/15
to
On Wed, 15 Jul 2015 11:18:48 +0000
"William A. Mahaffey III" wrote:
>
> .... I have my shiny new NetBSD 6.1.5 server up & running, all RAID
> devices working AOK, several reboots completed, swap configured, etc.
> All is well except for a few pilot errors. Following recommendations
> I now login to root by su, rather than directly at the console. When
> I do, none of my aliases get set & filename completion using the tab
> key doesn't work. This isn't huge, but is irritating.

You're probably using sh. If so you will need the following options in
.shrc:

set -o emacs
set -o tabcomplete

NetBSD also has ksh which is, as far as I know, pdksh under the hood. A
better korn shell clone is mksh, available in pkgsrc.

> All is well logging in at the console, although the screen is limited
> to 80 chars/line & 25 lines, which restricts what you can see in
> crowded directories. I am ssh-ing in as my regular user, BTW, that
> probably makes a difference. When fully operational, there will be no
> kbd/mouse/monitor hooked up, so I do need to get this either fixed or
> understood.

I found the best way to deal with the console is to specify a vesa mode
in /boot.cfg. When booting, choose 5 to drop to a prompt and type "vesa
list". This will give you a list of vesa modes supported by your
hardware. For example, 0x14b. You then type "vesa 0x14b" and then "boot".

You can then add your chosen mode to /boot.cfg as follows:

menu=Boot normally:rndseed /var/db/entropy-file;vesa 0x14b;boot netbsd

--
Gerard Lally

William A. Mahaffey III

unread,
Jul 15, 2015, 5:30:51 PM7/15/15
to
On 07/15/15 12:24, Greg Troxel wrote:
> "William A. Mahaffey III" <w...@hiwaay.net> writes:
>
>> Following recommendations I now login to root by su, rather than
>> directly at the console. When I do, none of my aliases get set &
>> filename completion using the tab key doesn't work.
> man su, see -m
>
> install and then man sudo, see -E
>
> I use "sudo -E $(SHELL)", more or less, to get a shell that's just like
> mine, but with uid 0.

What is the PKG_PATH for sudo, I have several commented out, which do I
use ?

4256EE1 # uname -a
NetBSD 4256EE1.CFD.COM 6.1.5 NetBSD 6.1.5 (GENERIC) amd64
4256EE1 #

Dan LaBell

unread,
Jul 15, 2015, 11:41:20 PM7/15/15
to

On Jul 15, 2015, at 5:29 PM, William A. Mahaffey III wrote:

> On 07/15/15 12:24, Greg Troxel wrote:
>> "William A. Mahaffey III" <w...@hiwaay.net> writes:
>>
>>> Following recommendations I now login to root by su, rather than
>>> directly at the console. When I do, none of my aliases get set &
>>> filename completion using the tab key doesn't work.
>> man su, see -m
>>
>> install and then man sudo, see -E
>>
>> I use "sudo -E $(SHELL)", more or less, to get a shell that's just
>> like
>> mine, but with uid 0.
>
I think this has to be a typo, command substitution is not warranted
$SHELL or ${SHELL} is what's meant, also I think, you just try '-l'
w/ su , or "sue tack el". and not "Install, [and configure], and then
man sudo "
You're the only admin for this system? Sudo would have use your user
login password to get root, not root's password.

Also, I'd recommend against "su -m" "leaving environment unchanged."
I'd say remember that exists, to rescue a broken .profile etc, but avoid
habitual use, and just change the directory, after becoming root.
You want your profile read, right? Not changes to PATH, etc done at
command line?

Dan LaBell

unread,
Jul 16, 2015, 1:01:22 AM7/16/15
to

On Jul 15, 2015, at 12:11 PM, William A. Mahaffey III wrote:

> I now login to root by su, rather than directly at the console.
> When I do, none of my aliases get set & filename completion using
> the tab key doesn't work. This isn't huge, but is irritating.

To get a login shell do, su -l
Also, if ssh'ing from remote to a user, just to su, then 'exec su -
l', can be useful. Historically, it was 'su -'. sometimes said,
"sue dash"

I'd consider unsetting ENV, in your profile ( and everywhere,
actually ).

William A. Mahaffey III

unread,
Jul 16, 2015, 1:06:55 AM7/16/15
to
On 07/15/15 21:50, Dan LaBell wrote:
>
> On Jul 15, 2015, at 5:29 PM, William A. Mahaffey III wrote:
>
>> On 07/15/15 12:24, Greg Troxel wrote:
>>> "William A. Mahaffey III" <w...@hiwaay.net> writes:
>>>
>>>> Following recommendations I now login to root by su, rather than
>>>> directly at the console. When I do, none of my aliases get set &
>>>> filename completion using the tab key doesn't work.
>>> man su, see -m
>>>
>>> install and then man sudo, see -E
>>>
>>> I use "sudo -E $(SHELL)", more or less, to get a shell that's just like
>>> mine, but with uid 0.
>>
> I think this has to be a typo, command substitution is not warranted
> $SHELL or ${SHELL} is what's meant, also I think, you just try '-l'
> w/ su , or "sue tack el". and not "Install, [and configure], and then
> man sudo "
> You're the only admin for this system? Sudo would have use your user
> login password to get root, not root's password.

Yes, just me, myself & I ....

>
> Also, I'd recommend against "su -m" "leaving environment unchanged."
> I'd say remember that exists, to rescue a broken .profile etc, but avoid
> habitual use, and just change the directory, after becoming root.
> You want your profile read, right? Not changes to PATH, etc done at
> command line?

Yes to both of the last questions. I went to 'su -' & everything mostly
works. I also recall from last year, messing around w/ NetBSD on my
RPi-B+ time server, that rxvt (what I usually use on this box, FreeBSD
9.3R-p13) has some issues when ssh-ing into NetBSD. When I switch to an
xterm, everything behaves much better, which I am now doing. Thanks :-).


--

William A. Mahaffey III

----------------------------------------------------------------------

"The M1 Garand is without doubt the finest implement of war
ever devised by man."
-- Gen. George S. Patton Jr.


0 new messages