From: edacval@gmail.com (edacval at gmail.com)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Getting the magic Sysrq key to work (on Ubuntu)
Date: Thu, 30 Dec 2010 02:49:29 +0200 [thread overview]
Message-ID: <4D1BD719.8090305@gmail.com> (raw)
In-Reply-To: <AANLkTimttCD4peJSDnE3FdYKVkzyHOqOH=YctmBug0Jx@mail.gmail.com>
Hi
>
> Note that trying to sudo echo a value into /proc/sys/kernel/sysrq doesn't
> work:
>
> *julie at zeus:/proc/sys/kernel$ cat sysrq
> 0
> julie at zeus:/proc/sys/kernel$ sudo echo "1" > sysrq
> bash: sysrq: Permission denied
> julie at zeus:/proc/sys/kernel$ ls -l sysrq
> -rw-r--r-- 1 root root 0 2010-12-29 19:37 sysrq
> *
> Instead, I have to explicitly log in as root:
>
> *julie at zeus:/proc/sys/kernel$ cat sysrq
> 0
> julie at zeus:/proc/sys/kernel$ su
> Password:
> root at zeus:/proc/sys/kernel# echo "1" > sysrq
> root at zeus:/proc/sys/kernel# exit
> exit
> julie at zeus:/proc/sys/kernel$ cat sysrq
> 1*
>
> or sudo a shell:
>
> *julie at zeus:/proc/sys/kernel$ sudo bash
> [sudo] password for julie:
> root at zeus:/proc/sys/kernel# echo "1" > sysrq
> root at zeus:/proc/sys/kernel# exit
> exit
> julie at zeus:/proc/sys/kernel$ cat sysrq
> 1*
>
> Which I presume might be counter-intuitive for some Ubuntu users, as AFAICR
> they're not encouraged to create an explicit root account but are expected
> to sudo
> everything instead - in other words they're likely to simply tag 'sudo' in
> front of
> any CL operation that would normally be root-only and expect it to work.
>
sudo bash -c "echo 1 > /proc/sys/kernel/sysrq"
or
echo "1" |sudo tee /proc/sys/kernel/sysrq
prev parent reply other threads:[~2010-12-30 0:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-29 22:16 Getting the magic Sysrq key to work (on Ubuntu) julie Sullivan
2010-12-30 0:49 ` edacval at gmail.com [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D1BD719.8090305@gmail.com \
--to=edacval@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.