2018-07-03 16:22 GMT+03:00 Mart Raudsepp <l...@gentoo.org>: > Ühel kenal päeval, T, 03.07.2018 kell 14:00, kirjutas gevisz: >> Are you, by any chance, running this command through something like >> > lxc-attach or ssh? >> > I had the exact same problem two days ago and it turned out to be >> > something about the >> > environment being passed to the remote system. Sourcing >> > /etc/profile did the trick. >> >> No, I do it on my desktop staying just in front of me. >> So, no need for ssh (and I do not know what lxc-attach is at all). >> >> Still, sourcing /etc/profile somehow helped: > > How do you obtain root privileges for the command?
su > If you use su, you should be using "su -" (or "su -l" or "su --login"), > not "su". I have used only "su" for already 3 years, since switched to Gentoo from Ubuntu and never had any problems with it. Could you explain a little bit more why "su -" should be used instead. >From the man page I've got the following: -, -l, --login Provide an environment similar to what the user would expect had the user logged in directly. But I cannot see why I need the original root environment, especially if I never set it up. > If you use sudo, you might need to pass -i (--login) option to it. I hate using sudo since I have been forced to use it in Ubuntu.