imjustleaving / trueNAS

67 stars 3 forks source link

Root access required #3

Closed tyler72us closed 1 year ago

tyler72us commented 1 year ago

Hey I love your guide. Thanks for doing it! I'm running into an issue on the HeavyScripts portion. When I try to run the script the shell says I need to run it as root. Even if I run it with sudo.

imjustleaving commented 1 year ago

are u on this part? https://github.com/imjustleaving/trueNAS/wiki/A-Guide-to-go-from-a-bare-metal-TrueNAS-Scale-install-to-a-Fully-Automated-Media-Server#heavyscript

if u are, do u mean where u do the curl command or after u add a cron job?

tyler72us commented 1 year ago

curl command. I know iX has been trying to eliminate root, so maybe related to that?

imjustleaving commented 1 year ago

when u go to System Settings > Shell, by default truenas opens as root. however, i realize i may have made a mistake in the guide by telling users to switch the the '/' directory. ive updated the guide; go through the steps again and tell me if that solves it. if not, send screenshots with ur next post so i can see what is going on.

tyler72us commented 1 year ago

Sorry for the delay. Attached is a screenshot ![Uploading Screenshot 2023-07-26 150156.png…]()

tyler72us commented 1 year ago

Screenshot 2023-07-26 150156

imjustleaving commented 1 year ago

it looks like you ssh in through a terminal. could you try to run the curl command from the truenas GUI interface through System Settings -> Shell? i have the suspicion admin@truenas is not being treated the same as root@truenas, which is what the default shell gives u with the # for root permissions.

tyler72us commented 1 year ago

unfortunately that is the shell from the GUI Screenshot 2023-07-26 154728

imjustleaving commented 1 year ago

huh. did u setup an admin user separately? it would definitely help if u logged in as root instead of admin.

tyler72us commented 1 year ago

I mean I might be able to but, "Starting with SCALE Bluefin 22.12.0, root account logins are deprecated for security hardening and to comply with Federal Information Processing Standards (FIPS). All TrueNAS users should create a local administrator account with all required permissions and begin using it to access TrueNAS. When the root user password is disabled, only an administrative user account can log in to the TrueNAS web interface.

A future update of TrueNAS SCALE will permanently disable root account access."

https://www.truenas.com/docs/scale/gettingstarted/configure/firsttimelogin/

imjustleaving commented 1 year ago

ive never done this with anything but the root user. def check ur permissions since thats the error youre getting. did u give your admin user sudo permissions (check box)?

image

tyler72us commented 1 year ago

Yep, that box was already checked

imjustleaving commented 1 year ago

when you go to system settings > shell, could u enter the command 'pwd' and send the output please?

tyler72us commented 1 year ago

/home/admin

On Wed, Jul 26, 2023, 4:14 PM imjustleaving @.***> wrote:

when you go to system settings > shell, could u enter the command 'pwd' and send the output please?

— Reply to this email directly, view it on GitHub https://github.com/imjustleaving/trueNAS/issues/3#issuecomment-1652668527, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBU4IPKR6XDFP4SCXA6ALLXSGQEXANCNFSM6AAAAAA2MJAEEU . You are receiving this because you authored the thread.Message ID: @.***>

imjustleaving commented 1 year ago

youre going to want to enter the command cd /root then try the curl command from there.

tyler72us commented 1 year ago

Access denied. IX has been shutting off root access. That's what that link I sent was for. I even added the admin user to the root group.

On Wed, Jul 26, 2023, 4:21 PM imjustleaving @.***> wrote:

youre going to want to enter the command 'cd /root' then try the curl command from there.

— Reply to this email directly, view it on GitHub https://github.com/imjustleaving/trueNAS/issues/3#issuecomment-1652673850, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALBU4INPEFVZ7RXDSHDLWNDXSGQ6HANCNFSM6AAAAAA2MJAEEU . You are receiving this because you authored the thread.Message ID: @.***>

imjustleaving commented 1 year ago

so i just tried adding a test user. this is my users aux groups: sudo, builtin_administrators, builtin_users, root the shell i have selected is bash i checked the box for Allow all sudo commands.

then i executed the following commands from the shell:

sudo su cd /root curl -s https://raw.githubusercontent.com/Heavybullets8/heavy_script/main/functions/deploy.sh | bash && source "$HOME/.bashrc" 2>/dev/null && source "$HOME/.zshrc" 2>/dev/null

see if that works for you.

tyler72us commented 1 year ago

That did it! Thanks!