Timeline for Using sudoedit in a script (non-interactively)
Current License: CC BY-SA 3.0
11 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| May 14, 2015 at 21:00 | vote | accept | mdjnewman | ||
| May 13, 2015 at 7:45 | answer | added | mdjnewman | timeline score: 4 | |
| May 12, 2015 at 23:57 | comment | added | mdjnewman | Thanks - will try out some combination of the method from the link above and using ed. | |
| May 12, 2015 at 23:54 | history | edited | mdjnewman | CC BY-SA 3.0 | Original comment about permissions was incorrect - `cat` was running as my user, not as bob. |
| May 12, 2015 at 23:41 | comment | added | glenn jackman | Oh, well, use ed which is easily scripted. | |
| May 12, 2015 at 23:15 | comment | added | Gilles 'SO- stop being evil' | @glennjackman You can use whatever editor you like. The point of sudoedit is that the editor runs as you, but works on a temporary file, then sudoedit moves the content to the real file. | |
| May 12, 2015 at 11:36 | comment | added | glenn jackman | You can't even specify the editor, that's configured. You'll have to talk to your administrator to get more privileges. | |
| May 12, 2015 at 11:17 | comment | added | mdjnewman | Thanks @heemayl, but I don't have rights to sudo anything as 'bob' - sudoedit for that particular file is literally all I can do. | |
| May 12, 2015 at 11:14 | comment | added | heemayl | Check something like sudo -u bob bash -c "echo 'spamegg' >> /foo/bar.conf" | |
| May 12, 2015 at 10:27 | review | First posts | |||
| May 12, 2015 at 12:07 | |||||
| May 12, 2015 at 10:23 | history | asked | mdjnewman | CC BY-SA 3.0 |