Questions related to the sudo command that allows users to run programs with the privileges of a different user (normally the root user).

learn more… | top users | synonyms (1)

1
vote
1answer
204 views

Init file in init.d calls using sudo in script.sh give error sudo: no tty present and no askpass program specified

I an trying to make a script that launches on boot to connect to my personal VPN. I have an init file: /etc/init.d/vpnstartup which calls my vpnon.sh script on boot with the commands: case "$1" in ...
1
vote
1answer
205 views

Is sudo killall -u lightdm safe?

I realized that my server has many processes runned by lightdm: Can i killall processes from lightdm? Is sudo killall -u lightdm safe?
1
vote
1answer
796 views

Running Composer without using sudo (tried changed owner and permissions)

Every time I run composer (e.g., sudo composer install, sudo composer self-update etc.) I need to run this with sudo as the owner of the file is root. However every time I use the composer with sudo ...
0
votes
0answers
16 views

Why is the samba configuration file read only? [duplicate]

I am using samba on Ubuntu server to share files among my computers. I got done writing the configuration file, and I typed :wq to save the file. When I went to save and exit, I got the following ...
0
votes
2answers
52 views

Broken Sudo and no write privilige on file system

I had upgraded ubuntu12.04 to ubuntu14.04 and it didn't boot unless I edited this line in the grub menu linux ${rel-dirname}/${basename} root=${lINUX_HOST_DEVICE} loop=${loop_file_relative} ro ...
0
votes
0answers
21 views

I cannot install any application [duplicate]

I get the following error in my command window kittu@kittu-PC:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting ...
1
vote
1answer
205 views

cannot use sudo after using sudo passwd root

My System problem detected when I tried sudo passwd root in my ubuntu. I changed my root password by using the below command. sudo passwd root Now my system password changed, after this i could ...
-3
votes
1answer
48 views

Why do liinux instructions almost never include sudo even when it is obviously necessary? [closed]

Why do Linux instructions almost never include sudo even when it is obviously necessary? You see it a lot, for example, you will see something like: "Edit /etc/hosts by doing $nano /etc/hosts and ...
0
votes
0answers
33 views

How to change a read-only file System

My roommates 2011 Macbook Pro died today. I made a flashbootable version of ubuntu and booted from it on his mac. I can move around his drive's directories, and while trying to solve this problem I ...
0
votes
1answer
37 views

Easing entry of sudo password for remote hosts?

I'm logging on to remote hosts via SSH to do server admin. The login uses a cert but I login as a normal user (ssh -p $PORT $USER@$HOST) and use sudo to run commands. It's a pain to have to enter the ...
0
votes
1answer
115 views

How to move folder from desktop to /lib/firmware?

I need to copy this b43 folder so i can get the broadcom firmware on Ubuntu 10.10 (which is the version I am running on). I've been looking around forever and have been trying different command lines ...
0
votes
0answers
225 views

XDG_Runtime_dir Variable not set

Per this link: http://superuser.com/questions/269407/apt-get-behind-proxy-on-virtualbox-ubuntu/506066#506066 I update my ~/.bashrc file with export http_proxy="<my proxy>" export ...
0
votes
2answers
71 views

Terminal window [duplicate]

New to Ubuntu 14.04. How do I get to a terminal window? Reason for question: I am wanting to do installs and workarounds with issues to do with DVDs and turning the music off when I close the music ...
0
votes
0answers
22 views

How does the system interprets sudoers file when there are two lines for the same user?

I have a system with a user already added to sudoers file with username ALL=(ALL:ALL) ALL Now I want to allow username to run a single script without asking for sudo password (cron job). This ...
0
votes
1answer
31 views

Why can I not add more secondary groups?

I make a group called "teamspeak" and I would then like to be a part of that group, so I use sudo usermod -a -G teamspeak xdrosenheim as it is explained here and in the man usermod. I then do id ...
0
votes
1answer
38 views

Write Nginx Config as Unprivileged User

I have a deployment script that gets executed by an unprivileged deploy user. To fully automate things, though, I have to write a web server configuration file to /etc/nginx/sites-available and ...
2
votes
1answer
199 views

“apt-get install wget” installs wget with 000 permissions

I need to install wget and so I used sudo apt-get install wget, and it did, in fact, install it to /usr/bin/wget, but the permissions are all wrong (other lines for context): -rwxr-xr-x 1 root ...
0
votes
1answer
54 views

can't type my password in terminal [duplicate]

I am trying to install torrent, so I typed some commands like: sudo apt-get install libssl0.9.8:i386 after this command: [sudo] password for shiddhant: here is the problem comes, the cursor was ...
0
votes
2answers
96 views

No sudo or root access anymore [duplicate]

I'm afraid I locked myself out of the sudo/root options. The one account that had sudo rights now reports that it doesn't have these anymore. How can I restore this? Do I need to use a live stick?
2
votes
1answer
33 views

Can't edit plugins/sudoers/ins_*.h

I am trying to edit the list of insults in Ubuntu which, as described here, are located in plugins/sudoers/ins_*.h. I have tried: sudo visudo -f /plugins/sudoers/ins_*.h which should edit that ...
0
votes
0answers
24 views

How to run an alias command with sudo [duplicate]

I created an alias called runmc that allows me to start up a java program. But I noticed that when I type in "sudo runmc" (It needs root access to work properly.), it will display "runmc: command not ...
1
vote
1answer
30 views

Program accessible only to super user

I installed TeXLive through the .iso file provided in the website. To check the installation I tried tex --version and it returned something like The program 'tex' is currently not installed. You can ...
0
votes
0answers
20 views

We use sudo so i assume there is no SU passwoird or is it random? How tough is it if it exists? [duplicate]

We use sudo su. I assume there is no root password and is default? How tough is it if password exists?
1
vote
1answer
124 views

how to create admin account as a duplicate root account for telnet and disable root login over network?

I've been searching for the answer to this but all I find is "It doesn't work". I am a new, yes. I am still a student and i still learn about it. I am happy to break my OS and format it many times if ...
1
vote
1answer
404 views

Ubuntu Sudo Command not working

I mistakenly excuted: $ sudo chmod -R 777 /* I can not run sudo any more: I have tried changing the permissions with recovery mode but when I log in back into my account sudo is not still working. ...
0
votes
1answer
51 views

Problem with sudo via ssh

I'm using the following script to execute a update script on a certain number of servers in my network. Here is the part, which I think that is relevant. ### Actual Work ### if [[ $manual == 1 ]]; ...
0
votes
1answer
80 views

How is the default user given sudo access without being listed in sudoers?

I have a question about command sudo. Basically, you know, sudo allows any permitted users who enrolled in the /etc/sudoers to perform some commands specified in it. At this point, I wonder how my ...
0
votes
0answers
24 views

Can i use “gksu” to became root for CLI operation?

I don't care if this is unsafe, because i'm only doing it as a programming exercise, but that's what i want to do: I want to create a C program that, with the "system" command, will call dpkg and ...
0
votes
1answer
127 views

What is the reason for /etc/sudoers near line 23 error?

I fix that /etc/sudoers near line 23 error by using pkexec visudo command. But I don't know the reason. Can any one tell me the reason? And how to prevent these type of error in future? My File Like ...
0
votes
2answers
56 views

Shutdown privileges problem

I have found that when I click the shutdown button when logged into a normal user account that once it has terminated all running processes and it says something about a modem shutting down, it can ...
1
vote
2answers
154 views

Undo the “sudo” within a script [duplicate]

Is there any way to undo the sudo within the script? like.. sudo ./script.sh commands 1,2,3,4,5 with sudo rights commands 6,7,8,9 without sudo rights
0
votes
0answers
97 views

sudo : tty not found

This has been a very recent problem. Every time I log into my user session, a dialog box pops up saying: sudo: tty not found and no askpass program specified It also says that the user session is ...
0
votes
0answers
32 views

How is the UID of a user passed to sudo, eg in a “sudo mount…” command?

When I runsudo mount -t nfs -o udp,vers=3,soft,intr,rsize=8192,wsize=8192 nas:/nfs/shares/kevin /mnt/nas/ I know that to be successful my UID must match the UID of the owner of the exported filesystem ...
2
votes
1answer
68 views

Filemanager that asks for sudo rights when it needs it [duplicate]

On my Mac I can copy files using the Finder, and if the destination folder has a different owner, a window pops up and asks for credentials. On Ubuntu or Linux Mint I don't see anything like that. ...
1
vote
0answers
2k views

sudo useradd: cannot lock /etc/passwd; try again later (no lock files)

When doing this on Ubuntu server 14.04: camilstaps@localhost:~$ sudo useradd --home-dir /var/www/xxx.camilstaps.nl/ --no-create-home --root /var/www/xxx.camilstaps.nl/ --shell /bin/sh xxx I'm ...
1
vote
1answer
109 views

Fstab doesn't update permissions or ownership rules [duplicate]

I mount a FAT32 filesystem (because it needs to be compatible with windows) that has an SVN repository on it. It is mounted with owners root:plugdev and permissions rwxrwx--- . My user account is a ...
1
vote
1answer
143 views

Error :invalid protocol while installing phonegap

pramod@pramod-Inspiron-5520:~$ sudo npm install -g phonegap npm ERR! Error: Invalid protocol npm ERR! at Request.init (/usr/lib/nodejs/request/index.js:361:51) npm ERR! at new Request ...
0
votes
0answers
55 views

User doesn't get gksu dialog so apps just fail

I am using Ubuntu with Xfce on Android in a chroot (via Linux Deploy). When I try to run some software that requires admin/root access the GUI does not prompt me for the admin password like it does ...
0
votes
1answer
42 views

New to Ubuntu! Help?

Good Morning Everyone, I have taken the leap to Linux from a life of Windows and OS X. And I'm stuck! I am trying to install Sense from the Open University and it looks like I have to follow a ...
0
votes
1answer
126 views

Power management failure and /usr/bin/sudo must be owned by uid 0 and have the setuid bit set

A few days age I purchased a new laptop, Asus X751MD, and I installed the 64 bit Kubuntu version of 14.10. After installing some programs and restarting the computer, I got the power management ...
10
votes
2answers
266 views

Run only parts of a script as sudo, entering password only once

I am writing a script (actually a combination of scripts and makefile) that installs external dependencies: some apt-get commands, some git cloning, building, installing, adding users to groups, ... ...
1
vote
4answers
463 views

How do I check if my root password (login) is disabled?

I accidentally enabled(set) my root password (by default it is locked), and now I want to "undo" it. I used both commands sudo usermod -p '!' root and sudo passwd -dl root in that order. How do ...
0
votes
1answer
198 views

A file (/usr/bin/sudo) highlighted with red in Terminal

Anyone knows what it means when '/usr/bin/sudo' is highlighted with red in the terminal? This wasn't like this a few minutes ago Apologies if this is a dumb question, but it's been a while I had to ...
0
votes
1answer
2k views

sudo must be owned by uid 0 and have the setuid bit set

I am trying to run the following command: d@d-Aspire-M5 ~ $ echo "My username is: `whoami`" My username is: d d@d-Aspire-M5 ~ $ sudo chown -R `whoami` /usr/local/lib/node_modules sudo: /usr/bin/sudo ...
0
votes
1answer
865 views

How do I get into recovery mode on ubuntu 14.04 if the option not showing

I just boot up my laptop then run the sudo apt-get update command, but there's an error says [username] is not in the sudoers file. This incident will be reported. .so I search the google for ...
0
votes
1answer
77 views

problem with software center 12.04

I have been using 12.04 in dell vostro since a year. It was working properly but suddenly the Ubuntu Software Center has started hanging. Now it doesn't open. And every time I try to open it, I have ...
0
votes
1answer
87 views

How do I add a command permission to specific user to do it without password? [duplicate]

I want to give permission to a user to do shutdown command without password. Shutdown command need root privileges. If I give NOPASSWD in /etc/sudoers, the user can do all command that need root ...
0
votes
1answer
288 views

Reset default permissions for /etc [duplicate]

I did a silly thing. I changed the permissions of my /etc folder using sudo chmod -R ugo+rw /etc After that I did some damage control using the command pkexec chmod 755 /etc Then I was able to ...
2
votes
1answer
174 views

Cannot Run Rscript from PHP but it runs perfect from terminal

I'm new to Ubuntu I'm trying to execute an Rscript in PHP using exec. However it doesnt run. When I run it from the terminal it executes perfectly. This is the code I run from commandline: ...
0
votes
1answer
155 views

bash- Control-C behavior (^C) / gksudo vs sudo

This is about how the ctrl+c key press has a different effect when performed to a gksudo instance as opposed to a sudo instance. I executed the following using gksudo to read an installation failure ...