Re: How to use sudo to get a root shell?

Gustin Johnson <[email protected]>
Newsgroups gmane.org.user-groups.linux.calgary.general
Message-ID <CAPM=hj7A6vAMWrqB6m1Wdc8HAFbf9SKBH+prSEg4P-6Q1JVTKw@mail.gmail.com>
Why not just use sudo to run lsof?

sudo lsof |grep openvpn

If you are looking for listening ports, then:
sudo lsof -i |grep openvpn



On Tue, Mar 17, 2015 at 11:39 AM, Joe S <[email protected]> wrote:

> I am wondering if someone can tell me the right way to get a root shell
> through sudo. I tried the following commands:
> sudo su -
> sudo -i
>
> Then tried the following command and got this warning:
>
> lsof|grep openvpn
> lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file
> system /home/joe/.gvfs Output information may be incomplete.
>
> It looks like Linux is looking in the wrong directory for info. I have
> read that the correct way to do this was sudo su -
> This would use root's environment and home directory.
>
> Looking on the Net is confusing as I get conflicting advice between
> this.
>
> Thanks
>
> _______________________________________________
> clug-talk mailing list
> [email protected]
> http://clug.ca/mailman/listinfo/clug-talk_clug.ca
> Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
> **Please remove these lines when replying
>

_______________________________________________
clug-talk mailing list
[email protected]
http://clug.ca/mailman/listinfo/clug-talk_clug.ca
Mailing List Guidelines (http://clug.ca/ml_guidelines.php)
**Please remove these lines when replying
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.