0
votes
1answer
20 views

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 ...
0
votes
1answer
45 views

Fail to redirect log to /var/log/syslog

I have an upstart script that does the following start on runlevel [2345] stop on runlevel [06] respawn pre-start script exec >/dev/kmsg 2>&1 REPO=git@github.com:blabla/bli ...
0
votes
2answers
115 views

Check If a script is executed as root?

I have a script that requires root privileges. I have to execute it either via sudo or from an account with uid 0 (e.g. root). If the script is not executed with sufficient rights then I want that ...
1
vote
3answers
135 views

Linux - Protection from ourselves (Root)

I love Linux and everything she stands for; however, unfortunately I grew up with Windows. Thusly so I have learned very bad practices (such as NT Authority will protect me). I have several Linux ...
1
vote
2answers
326 views

Why doesn't this spawn a root shell?

I'm on OSX 10.8. Before my experiment it's like this: Nathan-der-Graue:~ max$ ls -l /bin/bash -r-xr-xr-x 1 root wheel 1333920 17 Feb 15:22 /bin/bash Then I run Nathan-der-Graue:~ max$ sudo ...
1
vote
2answers
3k views

How do I become root user in bash? [duplicate]

Possible Duplicate: How to perform root level commands on Linux (Fedora) Live Media I just installed F17 and am trying to learn the basics of bash. All that I know for sure is that the ...
1
vote
2answers
922 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 ...
1
vote
1answer
202 views

Automation of restarting the network without root permissions/password

I'm an avid torrenter, and since I'm busy must of the day, having Transmission-GTK run at night is my best option. However, my college server loves to kick people out after either an extended time ...
3
votes
3answers
1k views

How do I run bash scripts as root over SSH?

I have a number of centralized scripts, which install certain pieces of middleware (for example JBoss-AS, JBoss-EWS, etc). The idea is to use expect to write a script which runs the script (which can ...
1
vote
3answers
546 views

bash won't accept my root password after activating it in Snow Leopard

I activated the root-user in Snow Leopard via Directory Utility, gave it a password. Still whenever I enter sudo whatevercommand into the bash and enter the password it says that its incorrect. I ...
3
votes
1answer
2k views

Adjusting $PATH in /etc/profile does not affect root

H I added a directory to the $PATH variable in /etc/profile. This works for my user account but not for root. It's easy to add it to my /root/.bashrc but I would like to understand whats's wrong. ...
2
votes
2answers
4k views

How do I go into root and have it change my prompt?

I am using ubuntu-10.04 and bash. I want to go into root and have it change my prompt to underlined red characters to reflect that I am in root. At the bash prompt, if I type: $ sudo bash then I go ...
2
votes
2answers
1k views

Lost shell password: change user password from root

I recently accidentally forgot my user password to my shell. I know the root password. How do I change the user password? I figure it's something like $su root $passwd -[something] username but ...
2
votes
6answers
1k views

How do I create a new user account on an Ubuntu Hardy server?

logged in as root, environmental variables are great. I typed "set" I did: useradd -m alex su alex For some reason, everything is gone when I type "set". How do I make it so that alex has all the ...
69
votes
5answers
61k views

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to ...