Questions tagged [su]

GENERAL SU SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. su is a utility to run a shell or other command as another user (root by default).

su is a Unix/Linux utility that runs a shell or a specified command as another user. By default, the other user is root, and su, with , is one of the two common ways of obtaining administrator privileges. Calling su usually requires typing the target user's password.

su originally stood for “super user” (it was only for running a root shell), and became later known as “substitute user” (or “switch user” or a number of similar backronyms) when it started accepting the target user name as an argument.

For system administration questions, see the su tag on Super User (for non-professionals), Server Fault (for professionals), or Unix & Linux.

460 questions
-2
votes
1 answer

How can I get root access on an Android 7.0 emulator?

I'm developing an android application which writes some json files into the external storage. For development I want to have a look for the written json files. I know that I can view these files with root access in /data/data/package-name/. But how…
Marcel Gangwisch
  • 8,856
  • 4
  • 23
  • 32
-2
votes
1 answer

Why could not get any output when use command sudo su -c "sed -n -e '$p' a.txt"

In Centos 6.7 Linux,I can get one line of output if I run the command: sed -n -e '$p' a.txt But if I use this command, it has no output: sudo su -c "sed -n -e '$p' a.txt"
nick wu
  • 139
  • 1
  • 5
  • 17
-2
votes
2 answers

How do I find the password for root user in EC2 instance?

Some permissions are broken on my server, and I have lost the ability to use sudo. So I need to do su and change the permissions, but when I do su, I am asked for a password. I never set a password for root user... Where can I find the password?
j_d
  • 2,818
  • 9
  • 50
  • 91
-2
votes
1 answer

Is it possible to pipe the password to login as root , rather that typing the password when it prompts in command line?? - Korn shell

I have a custom requirement by a specific user , that he wants me to write a shell script to move files from one folder to another folder . These two folders have different owners Now, I managed to do that by logging in as root, but want to achieve…
Bala Prasanna
  • 170
  • 1
  • 9
-2
votes
1 answer

Entering Password in su- through loop

The Scenario is like I have a list of root passwords. But i don't want to keep trying Manually. So i wrote the shell script : for i in {1..26} do su - >>result done and all my password are on a file "attempt.txt". Now on Command Prompt i type the…
Dhruv Chandhok
  • 780
  • 7
  • 18
-3
votes
1 answer

Laravel spatie package

I am using Laravel spatie package. I want to create a permission module for each controller and each controller has create, read, update and delete. Foe example, I have product controller and I don't want to create permission for that controller…
-3
votes
1 answer

Error when I try to check version of Sudo on Linux Live Server via SSH

I'm getting this error -bash: sudo: command not found while trying to check version of Sudo using the following command sudo -V Here is the screenshot of it: screenshotofbasherror--bash: sudo: command not found Thanks in advance!
-3
votes
2 answers

How to escape the `su -arch`?

I assign an account name arch. useradd -m -G users arch passwd arch Now su into arch with command su -arch. How to su into the account name arch with some kind of escape method?
showkey
  • 482
  • 42
  • 140
  • 295
-3
votes
2 answers

How do I change to su to modify a file in ruby script

I have an existing Ruby on Rails app that work fine, but now I need to add a line to a system file that the app normally does not have access to. Is there a simple way to open the file as SU? (Ruby 1.9.3, Rails 3.2, Ubuntu 12.4)
Robert McCabe
  • 495
  • 1
  • 4
  • 21
-5
votes
2 answers

How to run subprograms with root permissions on iOS?

With the Android SDK, I can run a process as a superuser by invoking su and then running my code. How can I do the same on iOS? Here's what I use on Android: // Elevate to root Process localProcess = Runtime.getRuntime().exec( "su"); // Now run…
Tapa Save
  • 4,769
  • 5
  • 32
  • 54
1 2 3
30
31