Disk error, what to do?

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
So which part of my post where I say that typing SU didn't do anything did you not understand?
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Did you even read my post $9 which I even linked here again in post #14?
You should not use the linking feature, as it seams to be broken. Clicking on post #14 links to post #9, but the quote shown in that post is from post #1. So it was not clear what you wanted to ask. But if you think insulting the people who try to help is the way to go .....
I enabled the root login in SSH settings, then logged in as root and typed su.
Ouch! As I mentioned, you should read some basics on shell commands and how Unix rights/permissions work, as you don't seem to understand what su does or what the root account is.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
Ok.



The instructions were pretty clear. Log in as root and type su.
I mean what else should I had concluded out of that?
I asked for step by step instructions for idiots and thought I got just that.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
And the answer didn't work, because when I do so, this happens:
octopuss@Skladiste:~ % su
su: Sorry

I already pointed that out three times (minus the shell output) and nobody seemed to notice.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
And the answer didn't work, because when I do so, this happens:
octopuss@Skladiste:~ % su
su: Sorry

I already pointed that out three times (minus the shell output) and nobody seemed to notice.
Hi Octopuss, The reason you have the "su: Sorry" is because you must have your root account "Enable password login" set to "No".
It let you go through the login but will not accept it by not letting you know what happened.

Normally, I usually use the "sudo screen" to access root privilege from my normal account without root privilege. I can also run "sudo command", command being any commands.

With "screen", everything you do is under the root account. To return to normal account , type "exit".
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
So su requires disabling the ability to log in to the entire system with the root account? Ok...

Nothing about Linux makes any sense :D
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
So su requires disabling the ability to log in to the entire system with the root account? Ok...

Nothing about Linux makes any sense :D
No, the opposite. The root account must be set to allow root login in order for the "su" command to be successful and not return the "su:Sorry" message.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
No, the opposite. The root account must be set to allow root login in order for the "su" command to be successful and not return the "su:Sorry" message.
It will work if your user is part of the Wheel group.

Hi Octopuss, The reason you have the "su: Sorry" is because you must have your root account "Enable password login" set to "No".
Working fine for me.
Code:
login as: Jailer
Jailer@192.168.0.200's password:
Last login: Sat Nov  2 09:12:35 2019 from 192.168.0.210
FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+fc3d65faae6(freenas/11.2-stable): Wed Dec  5 15:08:42 EST 2018

        FreeNAS (c) 2009-2017, The FreeNAS Development Team
        All rights reserved.
        FreeNAS is released under the modified BSD license.

        For more information, documentation, help or support, go here:
        http://freenas.org
Welcome to FreeNAS
Jailer@freenas:~ % su
Password:
root@freenas:/nonexistent #


Code:
login as: root
root@192.168.0.200's password:
Last login: Fri Nov  1 13:14:36 2019 from 192.168.0.210
FreeBSD 11.2-STABLE (FreeNAS.amd64) #0 r325575+fc3d65faae6(freenas/11.2-stable): Wed Dec  5 15:08:42 EST 2018

        FreeNAS (c) 2009-2017, The FreeNAS Development Team
        All rights reserved.
        FreeNAS is released under the modified BSD license.

        For more information, documentation, help or support, go here:
        http://freenas.org
Welcome to FreeNAS

Warning: settings changed through the CLI are not written to
the configuration database and will be reset on reboot.

root@freenas:~ #
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
@Jailer,
Do you have you root account set as the screenshot?
If not, try it.
freenas-root-account.png
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
Well, for me my account as a user is set to Wheel under Auxiliary Groups, and yet I can't do "su" successfully if "Root" is not allowed.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Likely because you're using public key authentication. That's the only thing different that I can see.

And for the security freaks out there, no I don't leave root password login enabled on my server.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Well, for me my account as a user is set to Wheel under Auxiliary Groups, and yet I can't do "su" successfully if "Root" is not allowed.
This would be the expected behavior. Doing a su - as user basically is a password login as root.

I think the confusion comes from this statement:
The reason you have the "su: Sorry" is because you must have your root account "Enable password login" set to "No".
This is probably not what you meant, right? You wanted the OP to check if his setting is "No" while it should be "Yes"?

BTW, one can also give a user root permissions checking the "[ ] permit sudo" checkbox in the user settings.
 

Octopuss

Patron
Joined
Jan 4, 2019
Messages
461
BTW, one can also give a user root permissions checking the "[ ] permit sudo" checkbox in the user settings.
That's why I expected smartctl to work in the first place - got that checked since the beginning.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
That's why I expected smartctl to work in the first place - got that checked since the beginning.
And yet, you never posted exactly what you did. The first time in post #25 you actually posted a command you issued and the resulting error message.
 

Apollo

Wizard
Joined
Jun 13, 2013
Messages
1,458
This would be the expected behavior. Doing a su - as user basically is a password login as root.

I think the confusion comes from this statement:

This is probably not what you meant, right? You wanted the OP to check if his setting is "No" while it should be "Yes"?

BTW, one can also give a user root permissions checking the "[ ] permit sudo" checkbox in the user settings.
My normal user account has the "[ ] permit sudo" checkbox checked, and the root account is not allowed to use password to login.
So when I log as root using "su" and enters the password, I get the "su:Sorry" answer.
Only when I allow root account to login with password can "su" succeed.
Regardless, as normal user, I can run "sudo" commands and gain root privilege.

So for the OP to prevent getting "su:Sorry" would be to set root account "Enable Password Login" to "YES" and see if it does indeed works.
After that, he can deisable password login for root and simply use his normal user account when "[ ] permit sudo" checkbox is checked.
 
Top