3
votes
1answer
142 views

Enable superuser when logged in with another user

Suppose that the machine has two users: Alice (admin) Bob (standard user) While Bob is logged in, how can Alice modify a root file (Bob does not have this permission even with sudo)? Alice tried: ...
1
vote
2answers
91 views

I can not log into Ubuntu 12.04

by ignorance and error I renamed the user_name of the directory /home/, called frank_account (home/frank_account) to sixven(/home/sixven) (using gksudo nautilus). Restarting Ubuntu, I get 3 users: ...
0
votes
3answers
57 views

Can sudo to user but 'run command as' is denied?

I was wondering how to run a command as another user from a script without password. sudo -l return: (root) NOPASSWD: /bin/su - someuser There is no problem to sudo as someuser. Command sudo su - ...
1
vote
1answer
37 views

super user group or user?

I am using the following command in Oracle Exadata: sudo su - odiadmin As sudo prompts for my own password, I am wondering if I upgrade myself to super user or do I switch to superuser ...
12
votes
1answer
332 views

How to tell sudo to repeat lecture once?

I'm letting one of my coding buddies have root access to my Raspberry Pi, and as I was getting everything set up, I tested sudo as him. It gave me "the speech": We trust you have received the ...
0
votes
3answers
147 views

How to stop regular users from Switching Users

I want to stop the normal users from using following commands /bin/bash /usr/bin/sudo /bin/su I added them in sudoers file but normal user can still use the following command This is how i add the ...
0
votes
2answers
59 views

Have rights during shell but not in a script (unless I sudo it)

I have a really basic confusion. How does sudo work? I noticed that when I ran a script it failed, since it tried to write a file in a directory that the following permissions: $ ls -l thedir ...
2
votes
4answers
1k views

Allow paswordless user to change to another passwordless user

I have two users dev and tomcat neither of them have a password. How can I allow dev 1 do su - tomcat without having him having to enter any credentials? 1 connects with ssh keyfile
1
vote
1answer
337 views

Is there a shorter way to change username, home directory and move files at the same time

I wanted to use and have tried sudo usermod durrantm_test -mdl durrantm_test2 but I get Usage: usermod [options] LOGIN ... However sudo usermod durrantm_test -l durrantm_test2 -md ...
8
votes
5answers
9k views

Can a linux user change their password without knowing the current password?

I'm setting up a few ubuntu boxes, and using opscode's chef as a configuration tool. It would be fairly easy to install public keys for each user on each of these servers, and disable password ...
1
vote
1answer
5k views

switching from user to root and revers (freebsd)

i want to make some modificaciones with root and then with my user, in fact i want to install sudo and he give me the error in the first step: cd /usr/ports/security/sudo make install clean ...
2
votes
1answer
785 views

Ubuntu 11.10 Server: create user, home directory, sudo privileges: command line only

I have a rackspace server and I'm having problems with configuration. I need to lock it down and throw away the key, because right now I can only login with root to do anything substantial. I also am ...
2
votes
1answer
399 views

How to create a sudo user that cannot delete me?

I'm sudoer on a remote linux machine and would like to create another user with the maximum privileges, except the privilege of managing my account. I'm assuming a sudoer can delete or change the ...
7
votes
2answers
4k views

Why is sudo telling me my password is wrong?

I recently installed OpenBSD 4.9 in my computer, so I could learn a little bit about Unix-like operating systems. I added a new user to the system called bruno. Ok. When I use the 'sudo' command, it ...
5
votes
4answers
1k views

How sudo/root-ness detection works

Programs that make changes system-wide require sudo unless I am already the root user. Now, the question is: how exactly does the system figure out that I am (not) root? Does it: Check to see if ...
4
votes
1answer
483 views

How to get the name of the user that launched `sudo`

My problem: I have a Python program, and the user launch it using sudo. Sometimes I have to get the user's home, and I can do this only knowing its name: import pwd pwd.getpwnam(username) So: how ...