Got past the first hump now no SAMBA

After reading how to install it and finding it needs the sudo (Linux) command and yet when I try to use sudo is say the command is not found. So I tried sudo -u openhab sudo -l and now I am at [sudo] password for openhab. I have not changed any passwords yet so I tried openhabian. No luck. P.S. I am using Putty SSH.

Do you use openhabian image or did you install the openhabian toolset on your distribution ?

1 Like

sudo → super user (or special user) do → run a command with another user context. The user has to be listed as a valid sudoer. User openhab is not in this list (if not manually inserted)

openhabian@openhab:~$ sudo -lU openhab
User openhab is not allowed to run sudo on openhab.
openhabian@openhab:~$
openhabian@openhab:~$ sudo -lU openhabian
Matching Defaults entries for openhabian on openhab:
    env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin, use_pty

User openhabian may run the following commands on openhab:
    (ALL : ALL) ALL
openhabian@openhab:~$

Which command do you want to issue?

1 Like

I’m going to elaborate a little bit here on users and sudo.

With an openHABian install, which is what I assume based on the other thread, there are two users that you need to be concerned about: openhabian and openhab.

openhabian is your login and it’s what you’ll use when logging into the machine (locally or via ssh) and what you’ll do everything at the command prompt as.

openhab is the user that the openHAB process runs under. This is a service level user without password or shell and normally is not a member of sudoers. You usually do not want it to be but can add it because there are some situations where it’s needed.

But the openhab user doesn’t need to run any sudo commands to get samba running. The openhabian user might.

With all that said, if it’s saying command not found, there is something significantly wrong with the openHABian install. Maybe something got corrupted or the like. Raspberry Pi OS, upon which openHABian is based, disables the login/shell for root so all root commands need to be done through sudo. If there’s no sudo the OS is essentially broken.

It will help up in the future to help you if you provide as much information as possible. You really cannot provide too much information. It’s far easier for us to ignore info we don’t need than it is to have to ask for more information because we were not given it. So in a situation like this, please post configs, your commands and their results (text is better but screen shots or pictures are better than nothing), relevant logs, etc.

When posting text configs, logs, et al use code fences.

```
code goes here
```

Given the title of the topic and your first post can I assume you are attempting to run openhabian-config?

1 Like

are you sure the error message is related to sudo and not the actual command you want to run?

sudo whatever
sudo: whatever: command not found
1 Like