su Questions

3

Solved

I've been working with bash for not more than 6 hours, and now I'm trying to create a menu that allows you to do some "fun" stuff :D. My problem is with the if statement that check if you...
Izzo asked 18/3, 2017 at 14:48

6

I have a shell script which needs non-root user account to run certain commands and then change the user to root to run the rest of the script. I am using SUSE11. I have used expect to automate the...
Cowpoke asked 24/7, 2012 at 18:13

22

Solved

I'm writing a C Shell program that will be doing su or sudo or ssh. They all want their passwords in console input (the TTY) rather than stdin or the command line. Does anybody know a solution? S...
Stallings asked 24/10, 2008 at 11:59

3

Solved

Recently, i downloaded brew and npm to my reinstalled macOS, and now i noticed, when i write "su" command and write my password, i am getting this: su.png My problem is, I want to get old su prom...
Jared asked 24/2, 2018 at 13:29

10

Solved

When running a script via sudo or su I want to get the original user. This should happen regardless of multiple sudo or su runs inside of each other and specifically sudo su -.
Lloyd asked 4/1, 2011 at 20:17

5

Solved

Getting a background process ID is easy to do from the prompt by going: $ my_daemon & $ echo $! But what if I want to run it as a different user like: su - joe -c "/path/to/my_daemon &;...
Bauhaus asked 1/6, 2011 at 6:33

1

Solved

I'm trying to install postgres on my WSL Ubuntu. Installation is finished but when I run psql the following error is displayed. psql: error: could not connect to server: could not connect to ...
Playmate asked 3/7, 2020 at 3:11

3

Solved

I want to execute some shell commands and get the output in a TextView. The command may have a continuous output like ping or logcat. Also, the TextView should scroll automatically as the command o...
Ursi asked 12/5, 2014 at 11:39

10

Solved

I'm Developing an Android Application where it requireds 3 things:- To keep the App up an running for specific time and then phone will be off (Working Fine) When phone get charging from ...
Mize asked 10/10, 2014 at 7:39

3

Solved

I have script.sh that must be run as user2. However, this script can only be run under user1 in my application. I would like the following command to run: su user2 -C script.sh but be able to r...
Metalloid asked 1/8, 2011 at 23:33

2

Solved

I have root enabled on osx El Captain. I tried some of the solution already provided on stackoverflow and supersu but couldn't fix the error. I exported function parse_git_branch() to .bash_profile...
Chidester asked 23/11, 2015 at 6:29

3

Solved

I have this "old" Lenovo A2107 tablet which I rooted years ago (using a download from http://androidforums.com/threads/a2107-root-mods-and-rom-discussion.661261/, tho running its root.bat script by...
Witte asked 2/9, 2015 at 12:27

4

Solved

I need my app to perform some su commands programatically (phone is rooted). When done using adb, the commands work. For instance: su -c "mkdir /sdcard/testdir" creates a directory called "testdi...
Pleiades asked 20/4, 2015 at 14:4

3

Solved

firstly I will present my situation. I need to execute "su" command in my android app and it works well. Then I need to execute "ls" command and read the output. I'm doing it by getting the output ...
Escent asked 1/8, 2011 at 9:41

1

Solved

I want to be able to switch users in the middle of a script. Here is one attempt: su - User << EOF /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/i...
Rolling asked 21/7, 2017 at 18:41

6

Solved

There is a shell script (/bin/sh, not bash) that requires root permissions for execution. If it is ran by a normal user it should ask user a password to get root access and re-run itself. Now it ...
Gramercy asked 4/10, 2010 at 15:1

9

Solved

I've written a script that takes, as an argument, a string that is a concatenation of a username and a project. The script is supposed to switch (su) to the username, cd to a specific directory bas...
Common asked 1/1, 2010 at 9:38

2

I try to make batch file to run adb commands. I want to use su -c, but I get the error: su: invalid uid/gid '-c'. I saw somewhere that my su version doesn't support -c, how can I enable this?...
Ukase asked 6/10, 2015 at 6:49

3

Solved

I know that running an app which possess sensitive information on a rooted device is not secure at all. So developers usually do root detection in such cases and if the device is found rooted,then ...
Gay asked 4/12, 2014 at 10:30

3

I am trying to use fabric to automate some administrative work that I am doing on a couple of servers. The general flow is the following: SSH with local user run: sudo su - to become root (provid...
Barbie asked 27/2, 2013 at 13:48

1

Question : How to execute one complete app with root previleges (not just few commands)? Scenario : I am working on a rooted android device. In an android app, I need to play the H.264 stream...
Endocrinotherapy asked 25/8, 2016 at 3:7

1

Both commands: sudo -i -u username sudo su - username Will log me in as username if I enter my password. Is there actually any difference between these commands?
Dharna asked 29/7, 2015 at 9:23

4

Solved

I need to make an application that can programmatically do what the force stop button does to applications. (I am using root permissions) I have tried this code: private void killApp(){ try { ...
Massotherapy asked 3/10, 2014 at 20:9

1

Solved

This is the simplest fork bomb :() { :|: & }; : I executed it on many linux distros and all of them crashed. But when I executed this in an android terminal there was no effect even after ...
Ave asked 14/12, 2014 at 6:26

1

Solved

generally, i login to a server xyz.com using my login credentials([email protected]), my home = /home/user/myuserid/ after login, i do "su - someuser" to access the files. i would like to...
Filling asked 29/9, 2014 at 22:59

© 2022 - 2024 — McMap. All rights reserved.