![]() This gives you root access, but maintains your current SHELL. You may have to set or change the root password by running sudo passwd root first. Note that when you use this command it will ask for the root password and not your login password. This is effectively the same as using sudo -i. Use the su (substitute user) command to get a root shell. From here you can run any sequence of commands as root, or run the command exit to leave the root shell. But you fall in the root home directory ( /root/). Note that the $ at the end of your prompt has changed to a #, indicating that you have root access. This will give you an interactive root shell. Next time you run another or the same command without the sudo prefix, you will not have root access. Run sudo and type in your login password, if prompted, to run only that instance of the command as root. To get root access, you can use one of a variety of methods: This will give you your normal shell from which you can run commands or programmes without root access. (It will, but there's no need for you to trust me on that.) For example: gksu -w -u admin gksu xclock xclock is a nice simple clock-window application.Launch an instance of your terminal (press CTRL+ ALT+ T or search for "terminal" in the Dash). You may want to test this with some pretty harmless command first, to make sure it does what you want.-S is the short form of -sudo-mode but neither has to be used because sudo-mode is the default.(You can also replace the first gksu with gksudo, but that would be extremely counterintuitive and confusing.) If you wish, you can replace the second gksu with gksudo to make it less confusing.Second, you must enter admin's password, to let admin run a command as root with the sudo backend.First, you must enter admin's password, to let normaluser run a command as admin with the su backend.You will be prompted for a password twice: Here's the command (yes, I have tested it -)): gksu -w -u admin gksu anyapplication ![]() The command run as admin must invoke gksu without the -w flag to use sudo to become root.To do this, normaluser must run gksu with the -w flag to make it run in su-mode instead of the default sudo-mode, and the -u flag to run the command as admin instead of root. normaluser must become admin to run a graphical command.The solution requires writing a command that performs two authentication steps: normaluser cannot directly run any command as root, because normaluser cannot use sudo, and nobody can become root with su because there is no root password. ![]() But gksu acts as a frontend for sudo, not su.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |