1

My root user is not working how he should. sudo works perfectly but if I login with root, autocomplete does not work for all commands which need root permission and I couldn't execute a file owned by one of my users. All things work if I enter root by sudo -i but not with su root or in textmode.

2 Answers 2

0

Have you tried

sudo su -

command .

Running su root does not execute your profile , and any path variables set explicitly will not be available , might be the reason if missing auto complete.

from error in comments ,right solution would be to change permission of your script,

chmod u+x /home/marten/Downloads/NVIDIA-Linux-x86_64-346.47.run
./home/marten/Downloads/NVIDIA-Linux-x86_64-346.47.run

OR if you can't do that

bash  ./home/marten/Downloads/NVIDIA-Linux-x86_64-346.47.run

and it should run.

8
  • I have the same problem with sudo su
    – Marten
    Mar 24, 2015 at 19:02
  • And the main problem was that my root user hasn't got the permission to execute ap file owned ba a normal user.
    – Marten
    Mar 24, 2015 at 19:04
  • with the dash at end , or sudo su - root could you also paste what error you are getting. Mar 24, 2015 at 19:10
  • root@marten-desktop:~# /home/marten/Downloads/NVIDIA-Linux-x86_64-346.47.run -bash: /home/marten/Downloads/NVIDIA-Linux-x86_64-346.47.run: No permission There is no execute permission set but as root I should be able to run everythin right? (Or am I incredibly stupid)
    – Marten
    Mar 24, 2015 at 19:12
  • could you try "bash /home/marten/Downloads/NVIDIA-Linux-x86_64-346.47.run" Mar 24, 2015 at 19:16
0

Use the command sudo su. This elevates privileges to Super User. Remember to type in exit after you're finished though. Constantly running as SU is dangerous. If you forget to exit, you're exposing your system.

10
  • Thanks for answering but it didn't work. I should add that this error came up when I updated to 14.10
    – Marten
    Mar 24, 2015 at 18:32
  • @Marten Can you clarify the problem that you're having then? Your question makes it hard to understand.
    – Terrance8D
    Mar 24, 2015 at 18:45
  • I'm sorry for my bad English. I'll try to explain my Problem better. I wantet to install Nvidia Drivers and perssed Ctrl+Alt+F4 logged in to root (I set the password before) and typed /home/marten/Downloads/N and then I pressed tab for autocomplete but it didn't. Then I typed it in manualy and it gave me bash: Downloads/NVIDIA-Linux-x86_64-346.47.run: No permission
    – Marten
    Mar 24, 2015 at 18:52
  • @Marten Well, that's normal. Bash can't autocomplete file names or directories. Here's how to do what you're asking: type in cd Downloads. You need to make the file executable as well. To do that, type in chmod +x NVIDIA-Linux-x86_64-346.47.run. Then you simply run the file by typing ./NVIDIA-Linux-x86_64-346.47.run.
    – Terrance8D
    Mar 24, 2015 at 18:54
  • But I had no permission to execute as root user. And it also doesn't autocomplete to apt-get install anymore but when I enter sudo apt-get in as my normal user it autocompletes.
    – Marten
    Mar 24, 2015 at 18:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .