0
votes
0answers
53 views

listing permissions

I'm a biomedical scientist and I'm having trouble running a custom data analysis pipeline written by one of our collaborators. His script crashes with /bin/sh: 1: ...
3
votes
1answer
228 views

Why don't the commands 'sudo bash' or 'sudo -s' ask for a password? [duplicate]

Even when I am logged in as a non-admin user, when I enter sudo bash or sudo -s, the system does not ask for any password. In the command history, I have not entered any password for sudo earlier ...
0
votes
0answers
163 views

unable to root login and may be ~/.bash problem

initially i am trying to connect with github with RSA key and it is giving error permission denied...unknown host. Then change my ~/.ssh directory permission to chmod 700 ~/.ssh chmod 600 ~/.ssh/ ...
1
vote
1answer
195 views

Why does the “who” command not show “root” as a logged in user?

When I log in as root from gnome-terminal using the command: sudo su it logs me in as the root user. Isn't this switching a user considered as a log in? Also, which command can show me all the ...
0
votes
2answers
578 views

Running a .sh file without root

I've recently downloaded a game (Mark of the Ninja from Humble Bundle 9 to be exact) to play on Ubuntu. From what I can tell after extracting the game, it is stand-alone and doesn't require ...
0
votes
1answer
97 views

sudoing my own bash scripting

Okay, so I have my scripts in ~/bin/, and they are added to the path normally. However, when I prefix them with sudo, they are not in the path. I figure this is because they're not in the path for ...
0
votes
2answers
4k views

Change the terminal prompt [duplicate]

This can be really trivial,but it helps in ways of making it more comfortable while coding and sending commands to terminal. My terminal source/bash/root name(my apologies, I dunno which is the right ...
1
vote
1answer
70 views

user recognizes command but root doesn't

I installed arm-linux-g++ and added its directory to PATH and it recognizes the command. But when I try it with sudo it says command not found. I even tried adding its directory to bashrc--root but ...
0
votes
1answer
875 views

~/.profile OR ~/.bashrc OR ~/.pam_environment

Please which one of these should I edit to give me required result of the path to my programs both in normal user and as root. I have added in normal user and as root but there is error as quoted ...
1
vote
0answers
54 views

Execute custom bash script with sudo without passwd prompt [duplicate]

I run ubuntu-12.04 desktop x86_64. I have a simple script that needs to be accessible from the Desktop and run as root: $ cat ~/Desktop/flash.sh #!/bin/bash - cd ~/tools sudo ~/tools/fastboot-HW.sh ...
3
votes
1answer
117 views

Bash - Get Sudoer Username?

Say I have the following bash script: #!/bin/bash echo $( whoami ) This is what it outputs with and without sudo: alix@netbook:~$ ./test.sh alix alix@netbook:~$ sudo ./test.sh root The script ...
0
votes
1answer
197 views

How can I execute scripts as root without pointing to its location?

I tend to use sudo arp-scan --localnet --interface wlan0 a lot, but I find it cumbersome to type this each time. To speed things up, I've created a script, called arp-lw-scan, which should do this for ...
5
votes
5answers
823 views

Service tab-completion broken as root, not even sure where to start looking

On most of our servers, tab completion of service names after typing in the service command no longer works, as root. It works just fine as non-root. This is on Ubuntu 12.04. I'm not even sure where ...
2
votes
2answers
290 views

Does sudo really make you root for a while?

On Ubuntu, in what kind of situations, if any, running a command as a non-root to access a file/folder or create/delete a file/folder using sudo may result in "permission denied" while running the ...
1
vote
1answer
815 views

Sudo Non-Password access to /sys/power/state

On my computer, pm-hibernate appears to be broken, however using the command echo disk > /sys/power/state appears to work perfectly. Now I just need regular user access to it, using sudo. How do I ...
2
votes
1answer
20k views

How to run Bash script as root with no password? [duplicate]

Possible Duplicate: How do I use sudo in my script without needing a password? I want to run a bash script as root with no password prompt. I tried visudo with no luck(your_username ...
3
votes
2answers
3k views

Run Bash Script as Root

Is there some way I can run a Bash script as root without being prompted for a password every time? I'm attempting to automate the process of starting my LAMPP install, which requires me running a ...
3
votes
2answers
5k views

How can I automate a root command after (not during) startup?

I'm using Ubuntu 12.04 LTS, but I need to run the following command: sudo dhclient after startup to acquire a stable ethernet connection. I am running dhclient during startup already, through the ...
0
votes
0answers
383 views

How to change the root password on Ubuntu 11.10? [duplicate]

Possible Duplicate: How to know my root password? I am using Bash. I have a freshly installed Ubuntu 11.10 and I need to change the password.
14
votes
3answers
32k views

What is the difference between 'su -' , 'sudo bash' and 'sudo sh'?

I would like to know what is the difference between su - sudo bash sudo sh I cannot login as root while doing su - because I do not have the root password - I mean I have my user password with ...
2
votes
1answer
6k views

Where is bashrc profile for root?

I believe the question says it all. Also if it doesn't exist where do I create it. Ubuntu 10.04
5
votes
1answer
2k views

How to execute a script as super user first checking the user and getting pass from askpass if not super user

thers a similar question out there How can I determine whether a shell-script runs as root or not? I have the same doubt with different result Is it possible to, within the BASH script prior to ...
16
votes
7answers
7k views

How can a script check if it's being run as root?

I'm writing a simple bash script, but I need it to check whether it's being run as root or not. I know there's probably a very simple way to do that, but I have no idea how. Just to be clear: What's ...