![]() I would also like to find a method for merging user history with root history (similar to the way the PATH environment variables are merged with âsuâ). Where would this be defined (so I can undefine it)? Thanks. How would I change this? There must be an alias defined for sudo that sets it to âsudo -Hâ. I prefer the Ubuntu behavior which is that sudo keeps the HOME environment variable set to the original userâs home directory. You might want to read the sudoers and vi manual pages for additional information.Īfter some experimentation with sudo, it appears that opensuse sets the -H option ( set the HOME environment variable to the home directory of the target user (root by default)). Hit CTRL + X, then Y, then to save your file and exit nano. If you made a mistake, perhaps the easiest way is to redo from start, to exit without saving (hit Escape to enter the command mode) and then type :q! . Now, if you're happy with your editing, type in :w to write the file and :q to exit vi.(vi!) hit Escape to return to command mode. If you specify a negative value, the timeout will never expire. If you specify 0 you will always be asked the password. Where X is the timeout expiration in minutes. (vi!) press the A (capital "a") key to move at the end of the current line and enter editing mode (append after the last character on the line). Ignore these if youâre using nano) Use the arrow keys to move to the end of the Defaults line. (Vi specific instructions noted with (vi!). Youâre now a super user editing one of the most important files on your system. This opens an editor and points it to the sudoers file â Ubuntu defaults to nano, other systems use Vi. If you want to change that you can do so by Ä«y default sudo remembers your password for 15 minutes. įor a detailed description of the differences see man su and man sudo. I tried âsudo -iâ, âsudo -sâ, âsudo bashâ, and âsudo suâ, and ranÄ®nv > env- see : Ubuntu Forums Post with nice table. None of your variables are carried over and only the root Defaults remain. ![]() With su you are basically root, but your own environmental variables are "preserved".Īnd your environmental variables are merged with that of root's. How is rootâs PATH set? - Ubuntu Forums]( ) sudo su Would anyone be kind enough to suggest edits so I can use these notes for opensuse? (Letâs make these notes into an opensuse âsuper userâ mini-tutorial.) On these forums, I see people using âsuâ and âsu -lâ and other variants.Ä«elow are some notes I collected/edited for Ubuntu. It took me a while to figure out that âsudo -sâ was usually what I wanted in Ubuntu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |