Tag Info

Hot answers tagged

6

Open Terminal and type: sudo visudo Then scroll down to the line that reads: Defaults env_reset And change it to: Defaults env_reset,timestamp_timeout=0 You can change 0 to any values (time in minutes). Setting it to 0 will ask for your password every time and -1 will make it never ask. The default is 15 according to man sudo 8, but ...


5

These .Trash-0 directories appear when root deletes non-root user files from a file manager. The 0 is the system $UID, which is zero for root. The directories are created any time a user deletes files belonging to another user account. So I think you use your root account to delete some stuffs in your home using File manager not terminal. And yes you can ...


3

files should be "644", directories should be "755". What you want is not permissions but you want to set the files and directories to a user and group that is allowed to write files into /var/www/html/. sudo chown -R $USER:$USER /var/www/html/* would set all to your current user or if you need something like "www-data" (the default apache user) change it ...


3

Usually on Linux there is only one user root, and on Ubuntu it is deactivated. Instead it is a better idea to add all users that should have administrative privilieges to the group sudo by executing adduser username sudo as root. That allows them to execute commands as root by typing sudo command and get a root shell by sudo -i On top op that, you ...


3

Ok, Googling this, finding this U&L answer, checking its revisions history and following the quoted source in the revision #1, this happens to be an Upstart bug; the problem is that when switching to root running su the $UPSTART_SESSION environment variable is carried from the previous environment instead of being set again. After much banging my ...


3

Take a look at http://www.cyberciti.biz/open-source/command-line-hacks/linux-run-command-as-different-user/ then just write a sh script which you chmod +x so that you can execute it then just use the script to launch the other script.


2

The first error is because you created a user whose home directory doesn't exist. This is one of the reasons why you should always use adduser instead of useradd. As explained in man useradd: useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead. One of the features of adduser is that it ...


2

It is perfectly safe to change ownership of files in /var/www, and indeed anything in that folder is yours to edit and change how you wish. For example, if user tsmith needs to be able to write to files in /var/www/myweb then it's perfectly fine to set the owner of these files to tsmith. Or if you prefer, keep the owner as root and require tsmith to sudo ...


2

Reboot the system to enter grub. Select recovery mode. Enter root shell Remount the system with read/write permissions: mount / -o rw,remount Run chown -R root:root /usr/lib. Once done, reboot.


2

The content of the directory /usr/lib/xorg is a little harder to replace than the single binary file /usr/bin/Xorg. You can still do it by just reinstalling packages, but it's made up of many packages, some of which won't apply to you. $ find /usr/lib/xorg -exec dpkg -S {} + | cut -d: -f1 | sed -e 's/, /\n/g' | sort -u xserver-common xserver-xorg-core ...


2

If you can login as root: $ su root #enter password $ chmod 644 /usr/lib/sudo/sudoers.so If not, you'll have to startup in recovery mode, get write permission on your disk, and change the mode of that file. https://wiki.ubuntu.com/RecoveryMode $ mount -o remount,rw / $ chmod 644 /usr/lib/sudo/sudoers.so


1

Check the file: /etc/mysql/mariadb.conf.d/mysqld.cnf verify if this line exists: plugin-load-add = auth_socket.so then go to MariaDB: sudo mysql -u root and make these modifications: MariaDB [(none)]>use mysql; MariaDB [(none)]>update user set plugin=' ' where User='root'; MariaDB [(none)]>flush privileges; MariaDB [(none)]>exit I ...


1

Running applications as the root user presents several serious security risks. This is why the root account is not enabled for log in by default, and all actions which need escalated privileges are performed via usage of sudo. You should not log in and run applications as root. Doing so gives total access to your machine, to the application you are running, ...


1

First of all, known_hosts is not the file that you want to copy. That is just a list of all the systems that have been connected to to check if the system might have changed or a man-in-the-middle attack is being attempted. For password less connections, you need a id_rsa file in .ssh folder. You can copy the file and make sure is has the correct ...


1

DO NOT EVER DO THIS, but if you did sudo rm -rf / the rm command, running as root, would happily start deleting. If it found a file, it would delete it,. If rm found a directory, it would enter the directory, delete all the files, then delete the directory. Eventually, rm will run out of files to delete, or will delete a file rm needs (like a dynamic ...



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