[kwlug-disc] Johnny Cash: A boy name SU
L.D. Paniak
ldpaniak at fourpisolutions.com
Wed May 21 11:26:39 EDT 2014
Thanks Tim!
A solution to one of the great unsolved (for me at least) problems of
the universe: how to cleanly save that file you have no right to save
after you have made several dozen changes.
I challenge the emacs crowd to come up with an equivalent.
On 05/21/2014 10:53 AM, Tim Laurence wrote:
> I have found
> "sudo bash"
> gives me odd results because it uses a mix of the login and root
> environmental configurations.
>
> It find it is better to do
> sudo su -
> because that reinitializes the environment to be a pure root one. A
> shortcut for this is
> sudo -i
> which does the reinitialization within sudo. This can even be combined
> with -u
> sudo -u database_user -i
> to gain access to user accounts that may have highly customized
> environments such as I have found with several database servers.
>
> One last tip for sudo. If you have ever found yourself editing a
> config file in vi and find out, when you go to write, that you forgot
> to edit as root and the file is read only to you. Try this vi command
> :w !sudo tee %
> That translates to write to pipe connected to sudo which in turn pipes
> to tee which is passed the original file-name as a output target.
>
> --Tim
>
>
> On Wed, May 21, 2014 at 10:35 AM, Khalid Baheyeldin <kb at 2bits.com
> <mailto:kb at 2bits.com>> wrote:
>
> I use screen to open many shells, and in one "window", I do:
>
> $ su -
>
> Then enter the password
>
> I am in a root shell in that "window" forever.
>
> Or, if it is a machine that you are not logged into all the time,
> just do:
>
> $ sudo bash
> Then enter the password
>
>
>
>
> On Wed, May 21, 2014 at 10:20 AM, John Johnson <jvj at golden.net
> <mailto:jvj at golden.net>> wrote:
>
> On 2014-05-21 10:13, Khalid Baheyeldin wrote:
>
> Is it just me or what? The su has always been in Linux
> since forever.
>
>
> It is me. Not you.
>
> Many years ago I looked for SU and was advised to do all
> 'root' stuff with $ sudo.
> I did not know about $ sudo su<ENTER> until recently.
>
>
> JohnJ
>
>
>
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org <mailto:kwlug-disc at kwlug.org>
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
>
>
>
> --
> Khalid M. Baheyeldin
> 2bits.com <http://2bits.com>, Inc.
> Fast Reliable Drupal
> Drupal optimization, development, customization and consulting.
> Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra
> Simplicity is the ultimate sophistication. -- Leonardo da Vinci
> For every complex problem, there is an answer that is clear,
> simple, and wrong." -- H.L. Mencken
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org <mailto:kwlug-disc at kwlug.org>
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
>
>
>
>
> _______________________________________________
> kwlug-disc mailing list
> kwlug-disc at kwlug.org
> http://kwlug.org/mailman/listinfo/kwlug-disc_kwlug.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140521/7070593a/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 555 bytes
Desc: OpenPGP digital signature
URL: <http://kwlug.org/pipermail/kwlug-disc_kwlug.org/attachments/20140521/7070593a/attachment.sig>
More information about the kwlug-disc
mailing list