Tag Info

Hot answers tagged

21

No. It most emphatically is not safe. Here's the thing: You can delete files you own without sudo. If you don't own the file, and you are here asking this question, then you need to ask yourself: "Do I need to delete this file?" Overuse and consequent misuse of sudo is one of the banes of Ubuntu.


15

The slash at the start of /Desktop would have caused it to look for a Desktop folder in the root of the filesystem, which almost certainly does not exist, therefore nothing would have been deleted. In future, keep in mind that both sudo and rm have the ability to be dangerous. You should never need sudo just to manipulate your own files, and if you do need ...


10

Never use sudo rm and an absolute url or wildcard if you can help it. One day you'll have a typo and hate yourself.


8

It's sudo !! and not sudo!! Bash expands the !! exactly - it doesn't add spaces where there were none.


7

Impossible. Absolutely impossible. If they know the admin password they can do a-n-y-t-h-i-n-g and can always revert any change you make to the system. If you are the admin of those system you need to re-install those computers. There is no telling what those students did to those systems (for all you know they installed a keylogger, a mailserver or some ...


7

Use ~/Desktop as the path as /Desktop does not exist, the former is the path to your desktop. If it is a single file using sudo rm ~/Desktop/filename is absolutely fine. Just make ABSOLUTELY SURE you want to delete the file, if it is in your desktop folder and has sudo permissions, ask yourself if it needs to be deleted and if it does, whether you need to ...


5

Yes the root user is an official one. That user comes from a long line of historical influences. It's the conventional name of the user who has all rights or permissions. Most Unix-linke operating systems have a root user. It's not always called "root". You may know the Administrator of Windows operating systems. Some Linux derivates like Ubuntu allow ...


5

It lets you type the password, it just doesn't show it to you. Type the correct password and press enter. You should be able to go.


3

As posted, the line in your second echo is wrong; I tried manually adding django ALL=(ALL:ALL) ALL celery ALL(www-data) NOPASSWD: /usr/bin/unoconv to my sudoers using visudo and I also get a syntax error. You need = before (www-data) in the second line. A tip to validate sudo syntax without destroying your sudoers file: echo 'blah blah' | visudo -f - ...


3

"Safe" is an interesting description for anything with sudo. Doing sudo rm /Desktop/filename will only be "safe" if you wish to delete filename. It will not delete /Desktop. Be careful though. I think you mean to use sudo rm Desktop/filename. This will delete filename under Desktop from the directory you are currently in. By default there is no Desktop in ...


2

The command you are trying to run is: sudo fdisk -l That last character is a lowercase L, not the number 1. A lot of commands in Linux take options that are usually specified by a hyphen and then a character, for example -l, -i, or -h. That character is usually a letter. Sometimes, an option could also include a number, but it usually comes after a ...


2

The root account in Ubuntu is defaultly disabled. When you enabled the root account (set a password for it) then you can disble it easy by the following command: sudo passwd -dl root -d means to delete the password (make it empty) -l means lock the password of the account


2

In addition there are logging considerations to consider between sudo and su. Being su simply does everything as root with no entry other than one line in the auth log saying you became root. Sudo on the other hand - always gets logged as your user ID with escalated priveleesw.


2

In Nautilus you have two options to run a script when you double click on it: 1. Run in Terminal Using this option, your script will run correctly (as you said). 2. Run Using this option you have to use pkexec (or gksu if you have it installed) instead of sudo. That is because you can't run graphical commands which use sudo without to use an X ...


2

The OP found that the the problem is caused by a bug in Virtualbox: The issue is related to the VirtualBox "Guest additions" software. This post confirms there is a bug in version 4.3.14: http://forums.virtualbox.org/viewtopic.php?f=6&t=62687 VirtualBox 4.3.14 is the latest version, which I am using. As a work around I will downgrade to an ...


2

If you don't trust someone to have full shell access on your system, don't give them shell access at all. You want to stop cp command what about other commands that acts like cp , what about if admins use scp command . Am not saying its impossible to block this command , but a play around trick will defeat your goal .


2

If I understand you correctly, you would like to set up a universal password that all users would have to input in order to execute a command as root with a sudo command. Example: Account-A = Password-1 Account-B = Password-2 root = root-password If Account-A or Account-B enters the command: sudo apt-get autoclean Then the subsequent output: ...


2

Sudo is for users that have been put on the Sudoers list; in other words, users that have been granted limited administration rights. This allows people to modify otherwise restricted things, without direct root access, and allows for effective logging of such actions. The sudo password is your password. For example, [sudo] password for bowser: I would ...


1

The default sudo password for your installation (I am assuming you are a new user) is the password you set for yourself, when you set up Ubuntu. By default, you are a member of the sudoers list, and the system is asking you to verify who you are.


1

This is expected behaviour - sudo resets the environment by default. Starting a root shell with sudo su is one workaround. You can also modify the sudo behaviour (see the linked page).


1

You have misread the documentation. Given the spec: user host = (target_user:target_group) command in the sudoers of a system with hostname/IP host, user can execute command as target_user/target:group. If the system doesn't have hostname/IP host, this rule doesn't apply. Only the current system's hostname/IP is ever checked. It does not apply to remote ...


1

From the terminal do: sudo apt-get install gksu Then: gksu-properties in the window that opens change authentication mode to sudo. Now it should work.


1

It is a really bad idea to run uTorrent (or any server software for that matter) as root, even if the linked post instructed you to. That is really bad advice. You should create a separate user using adduser and run uTorrent as that user. You don't even need to install it into /usr/local, just put uTorrent in the new user's home directory. Is uTorrent ...


1

I was having the same issue even though the hostname in my /etc/hostname file and /etc/hosts file matched. My hostname was "staging_1". It turns out that you can't have an underscore in your hostname, which is why I was getting this error. Changing the underscore to a hyphen fixed my problem.


1

First enable the root account by setting a password: sudo passwd Then enable manual login in LightDM (assuming 14.04): sudo tee /usr/share/lightdm/lightdm.conf.d/50-allow-manual.conf <<EOF [SeatDefaults] greeter-show-manual-login=true EOF Restart LightDM: sudo service lightdm restart Login as root. You'll have to type both username and ...


1

It is root. In Ubuntu root defaults to having no password set so you have to sudo su - or sudo -s to login as root. Or if you really wanted, set a password for root and bypass the need for sudo (not adviseable) sudo su - Open the root users default environment, So you get the root users shell etc.. sudo -s Will open the shell defined in the ...


1

It's probably that you have damaged files on the system. Perhaps something went wrong during the upgrade, or the upgrade was halted before it was finished (possibly due to a power loss, or running out of disk space?) Segmentation fault is a serious error that should not occur in normal situations. This other answer suggested the use of: aptdcon ...


1

In Ubuntu by default, the root user has a disabled password and the mechanism available for general users to use root permissions is sudo. su with no arguments attempts to change the current user to root, and since it is disabled....


1

try using sudo passwd root to change password for your su user. See if that helps. Then retry using su and entering the password you have have have just assinged.


1

Open Terminal By CTRL+ALT+T and Type :- sudo passwd And Re-Enter your password !



Only top voted, non community-wiki answers of a minimum length are eligible