Solved Cannot access root managed functions over XRDP

I am building a new system, and I use vm-bhyve to manage VM's
Surprisingly, once logged in to the system via RDP and becoming root, the VM commands and other root-managed commands are not recognized.

For example: "sudo VM list" gets a VM: command not found. While some "sudo" or "su" commands work, others do not such as "pkg info" gets "pkg: not found".

Using whoami, I see that I am root.

My prior system running 13.2 does not have this complication.

Any idea where I should be looking to fix this?

I can execute these commands using SSH, however, sometimes it is far more convenient to use xrdp.
 
Smells like path/environment differences - so what does ssh do differently to xrdp when you connect/login? That's probably so vague as to be useless, sorry, but might help.
 
That is probably a good question, but I have no idea. What permissions differences are there between SSH and xrdp?
And why does the terminal in xrdp show my identity as root, but not allow root managed commands?

Would it make sense to re-install xrdp? Just thinking out loud here and can't try that right now.
Smells like path/environment differences - so what does ssh do differently to xrdp when you connect/login? That's probably so vague as to be useless, sorry, but might help.
 
Sitting in front of the machine, everything works fine. It just does not allow root-managed commands to work over xrdp.
Then its is environment in xdrp. I do not use xdrp, but it looks like environment. Compare the environment with console access. Also, can you run other shell scripts.

Show us something like this
Code:
root@Testsystem ~# who am i
root             pts/4        Sep  4 20:24 (tmux(1718).%2)
root@Testsystem ~# env
PWD=/root
LANG=C.UTF-8
TERM=tmux-256color
MAIL=/var/mail/root
MM_CHARSET=UTF-8
USER=root
TMUX_PANE=%2
TERM_PROGRAM_VERSION=3.3a
TMUX=/tmp/tmux-0/default,1718,0
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
SHLVL=2
SHELL=/usr/local/bin/fish
BLOCKSIZE=K
TERM_PROGRAM=tmux
HOME=/root
root@Testsystem ~# whereis vm
vm: /usr/local/sbin/vm /usr/local/share/man/man8/vm.8.gz

Also, trying to run vm list as an unprivileged user gives
Code:
/usr/local/sbin/vm: ERROR: virtual machines can only be managed by root

Try with full path - /usr/local/sbin/vm list - then you know, is it path problem.
 
When I was working on this and before my first post, I rebooted the machine several times. I did not power it down. I did power it down at the end of the day.
Today, I booted and xrdp works for "su -", but does not for sudo.

Aside from my concerns about the apparent change in behavior ( any comments there ) :-), this new root behavior works for me.

I do want to find out why sudo works on one machine and not the other.

I will be examining the differences in env between the user env, the sudo user env, and the su - user env to see what the differences are.

I will report back and then mark it solved with whatever I find.
Thanks again!
 
Back
Top