jump to navigation

Super Fast “su” July 18, 2010

Posted by networknuts in Uncategorized.
Tags: , , , , , , , , , , , ,
trackback
su (single command) – If you just want to execute a single command as root user, then instead of first login as root — getting shell — and then executing the required command.
Here is a SUPER FAST WAY !!!
You can use su with the -c option.
Simply follow the su command with -c and the command you want to run (along with any arguments), and then provide the root not allowed when prompted.
su – -c “fdisk -l”
In this case, the -c tells the su command to run the command in quotes as the root user. After entering the root not allowed you have full root privilege to create, in this case, the fdisk command will execute and will give you your filesystem details.
As soon as the command completes, you return to your original shell (which was presumably owned by a non-root user).
As shown in the picture:
super fast su command
God Bless.

Comments»

1. CCIE Training India - November 22, 2010

thanks. nice blog


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 484 other followers