Tag Info

Hot answers tagged

53

1. Why you don't have a root password While you can create a password for the superuser account allowing you to log in as root with su, it's worth mentioning that this isn't the "Ubuntu" way of doing things. Ubuntu have specifically chosen not to give a root login and password by default for a reason. Instead, a default Ubuntu install will use sudo. Sudo ...


17

By default, the superuser (root) account is disabled and doesn't have any password. You can create one by running: $ sudo passwd root You will then be able to login as root by running su using this password. As for chmod, the correct command would be: $ chmod 777 -R foobs You can also use: $ sudo -i to login as root using your password (without ...


2

I don't think sudo bash is wrong, it's just less convenient. For one, it's 2 more characters than sudo -i. With sudo bash you're just starting bash as another user (try doing it and doing pwd to see what the current directory is), whereas sudo -i "attempts to change to that user's home directory before running the shell". sudo -i tries to give you an ...


2

The correct command to install these lenses will be: sudo apt-get install unity-lens-music unity-lens-photo unity-lens-video autoagressive does not seem to be a package. If you want to remove those lenses it would be: sudo apt-get remove unity-lens-music unity-lens-photo unity-lens-video Both commands are assumed to be used with a user than is in ...


2

The command sudo passwd -dl root is for disabling root and removing root password. As explained in man passwd: -d --delete Delete a user's password (make it empty). This is a quick way to disable a password for an account. It will set the named account passwordless. -l --lock Lock the password of the named account. This option disables ...


2

My understanding was that rootpw just changes the behaviour of the password prompt. Your users still need to be named (explicitly, or through groups) /etc/sudoers. In this case kenneth isn't. Fix that and this should work. On a side note, this seems like a really backwards use of sudo. This is exactly the sort of behaviour sudo was invented to prevent ...


1

Just boot from Ubuntu live disk and copy /etc/sudoers file to the installed Ubuntu partition's /etc directory. Boot Ubuntu live dis and click try Ubuntu option on startup. Run sudo blkid command to know the installed Ubuntu's partition id. Mount the installed Ubuntu's partition on a specific directory like below, sudo mkdir /media/foo sudo mount /dev/sdaX ...


1

After I made a backup for /etc/sudoers file: sudo mv /etc/sudoers{,.bak} I get the same errors like in your case. If you use pkexec apt-get install sudo will not work because apt-get will see that: sudo is already the newest version. If you use: pkexec apt-get install --reinstall sudo will also not work because /etc/sudoers file is not found to ...


1

So I find that the most straight forward thing to do, in order to easily replicate this behavior across multiple servers, was the following: sudo visudo Change this line: # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL to this line: # Members of the admin group may gain root privileges %admin ALL=(ALL) NOPASSWD:ALL And ...


1

[Taken from Thread: I can't empty the trash as a user] (Solution posted works in Ubuntu 13.10.) The Trash folder is a hidden folder(the folders name begins with a period) in your home directory. You can press Ctrl+H in nautilus or select Show Hidden Folder from the View menu to list the hidden folders. You can open nautilus in the .Trash ...


1

This should help you. -a appends to the group and should only be used with -G, which is the groups to append the user. To answer your question fully, to add someone to the sudoers group and to reset the root password: su passwd root Enter new Unix password: Confirm new Unix password: Then: usermod -a -G sudo howdy Once this is done, you will need to ...


1

If you must remove the need for a password to use sudo, you can edit the /etc/sudoers file using sudo visudo command. # User privilege specification root ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges %admin ALL=(ALL) ALL # Allow members of group sudo to execute any command %sudo ALL=(ALL:ALL) NOPASSWD:ALL and add ...


1

In the first command, you are writing the output to a location that you have write access to, so everything is fine there. Now the /pra directory does not exist by default, so I assume you have created it using root access. So to write to it, you have to use root access as well. Just add sudo to the command as, sudo sshpass -p prakash123 ssh -t -p $1 ...


1

The error you are getting indicates that ruby is not in the sudo $PATH. TO get around this, you either need to export your environment correctly: sudo -E ruby Or, just use the full path. Run type ruby as your regular user, and use that with sudo. For example: $ type ruby ruby is /usr/bin/ruby $ sudo /usr/bin/ruby


1

Adapted from an answer on SuperUser: A percent sign is used to indicate that the identifier that follows should be used as the name of a group instead of a user. So here, sudo is the name of the group not the user sudo.



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