Tag Info

New answers tagged

0

Solution I also changed something and it was looking like loop back always when I tried to log in, but the solution is next: When you are on login screen open TTY by pressing Ctrl+Alt+F1, if you have enabled functional keys press Ctrl+Alt+Fn+F1. Login to your account on TTY session using your login credentials. In TTY session type command: sudo su and ...


0

When you run a command in bash via -c option, a non-interactive shell is spawned. The ~/.bashrc file is sourced for non-login interactive shells (and also for login interactive shells, sourced from ~/.profile). The main point is interactivity. The ~/.bashrc file has the following snippet at the start : case $- in *i*) ;; *) return;; esac This ...


1

You could try reinstall Kate from the terminal: sudo apt-get install --reinstall Kate and the reconfigure Kate: sudo dpkg-reconfigure Kate and it might work fine this way.


5

You should not run kate with sudo, that leads to such issues. Instead, use kdesu kate. Now, assuming that some permissions in your home directory got messed up, use this command to find all files in your home directory that are not owned by you (sudo is added in case you have a directory that is inaccessible by your user due to insufficient permissions, ...


1

FOUND IT!! Problem is specifying -t which can never work. A similar problem with systemd was reported but this one was for upstart. So changing to this was all I had to do: sudo docker run -t -i ubuntu Seems easy now, never just copy options without realising what they do.


3

You can use command aliases to limit what commands the user can run as sudo - e.g. this /etc/sudoers restricts the user to commands needed to do admin: # define host aliases Host_Alias HOSTNAME = laptop # define command aliases Cmnd_Alias ARCH = /bin/tar, /bin/gzip, /bin/gunzip Cmnd_Alias CRYPT = /sbin/losetup, /sbin/cryptsetup Cmnd_Alias DIR = /bin/mkdir, ...


2

Ndiswrapper is wrong. To start that module on boot run sudo tee -a /etc/modules <<< "rt5592sta" sudo update-initramfs -u


2

If you invoke sudo with the -H switch, mc should read/write its settings to root's home directory /root/.config/mc instead of writing them to your own home directory ~/.config/mc. From man sudo: -H, --set-home Request that the security policy set the HOME environment variable to the home directory specified by the target user's ...


2

It seems that you're trying to delete the folder from within the folder itself and giving a non-existing path for rm to delete. Do something like: cd ~/tmp sudo rm -rf remaster-iso


4

just kill the command again: go the terminal from which you run the command sudo nautilus and then press the key Ctrl+C Or easily just close the terminal by clicking on X, this would kill nautilus process


2

Another possible solution is to call the script in this way: sh ./connector.sh you can use any other shell type other than sh, depends on your code.


5

Either add a shebang at the first line of your script: #!/bin/bash echo "Hallo" And/or set the executable rights sudo chmod +x connector.sh


18

Testing result: If you add @reboot reboot This did not work!!! Why? $ which reboot /sbin/reboot Now When i added the full path of reboot, the cron job runs normally. So you got an infinite loop of rebooting in the case: sudo crontab -e And add the line: @reboot /sbin/reboot EDIT: If you want to get rid off this, you probably need to boot ...


2

Try to solve running the command: sudo chown -R root:approachit /var/lib/sudo/approachit Then run the command: sudo chmod -R 700 /var/lib/sudo/approachit


0

If you cannot get Terrance's solution to work, you can use the live environment from a cd. You will want to mount your / (root) partition, chroot into it, and use the normal tools to fix your user account. Detailed guide Reminder Never blindly run commands you find on the internet, especially not while you have root access. Some commands can cripple or ...


1

Hold down the left Shift key before your system boots to Ubuntu and it should bring you to the grub menu. After you get to Recovery Mode with root access, you need to mount the drive in Read / Write to make any changes. mount -o remount,rw / then you can check was groups the user is part of: groups username then to add the user to group sudo usermod ...


1

Since you're already root, instead of the complicated su -c "sudo /home/programer/bin/halt" user-name password - keep it simple /sbin/halt


0

You can use the -unixpw option to use the user's OS name/password to authenticate instead of a single shared VNC password. The same option also allows you to specify a list of which users to allow. There are also a couple of other variants of that option (-unixpw_nis & -unixpw_cmd) that offer more ways of hooking into the system security and doing ...


0

First go to your system file >then etc >then locate the file called hostname. Open it and you'll find a name. It's your machine's name. Then open the terminal and type >> sudo gedit /etc/hosts. Text editor should open up. There you will find a name in the second line. Replace it with the hostname you already found and save it. Done. P.S.- Don't edit ...


1

If you run sudo apt-get update sudo apt-get install -f this should be resolved. But you need to be connected to internet.


0

I think you may just be looking for the su command. B@my-pc:~$ su exec_prog exec_prog@pc:~$ Also if you'd like to allow user A to su as B without a password, you can edit /etc/pam.d/su and add the following lines # Change 'exec_prog' to the user you want to allow user B to become auth [success=ignore default=1] pam_succeed_if.so user = execute_prog ...


1

The correct command must be sudo cp /home/phablet/Pictures/background.png /usr/share/unity8/graphics/phone_background.png You missed a space between "from" and "to" path. The command in the question title is also wrong. It should be sudo mount -o remount,rw / I suggest to copy & paste commands, not to re-type them. Entering commands like you do ...


1

I have googled around and it seems (for some) that there is a bug in the latest Ubuntu software version of Nodejs that causes the segmentation fault that you are haveing The best way to install it is by getting node from the source and compiling it. I have setup a simple script on a github gist (right click and save as) that will take care of it. Make ...


1

Try removing with apt-get remove --purge. Maybe some files got left around. check the output of which npm. How did you install nodejs? I think the upstream version packages npm along with with node, whereas they're separate in ubuntu. If you installed upstream npm, removing npm with apt just switched you to using upstream npm. If the problem is with ...


1

Putting su at the top of the script, and then running the commands normally will work just fine. The reason you have to use sudo su instead of just sudo is because sudo only works on the main program, the redirection (>) is run without root privileges.


0

The reason sudo echo 1 > /sys/devices/system/cpu/cpu0/online doesn't work is because the sudo part applies only to the main command (echo 1); it doesn't apply to the redirection (> /sys/devices/system/cpu/cpu0/online), and so the writing-to-the-file part is done under your user account. Using something like echo 1 | sudo tee ...


0

Huh. That's weird. This should work: cat | sudo bash << "EOF" echo 1 > /sys/devices/system/cpu/cpu1/online echo 1 > /sys/devices/system/cpu/cpu2/online echo 1 > /sys/devices/system/cpu/cpu3/online EOF Perhaps the other stuff was working for you, but because you didn't disable the scaling governor it turned the cores back off before you ...


0

Rather than trying to fix it, consider creating a second user with sudo privileges. Hopefully this is straighforward to do via the unity ui, since I only know how to do it by editing /etc/sudoers. That way, "guest" remains unpriviliged like it's supposed to be, and you can make the second user as secure or insecure as you like.


0

It is every easy to do administrative tasks from a guest session. You don't need to log into a console. You can get a GUI terminal and enjoy copy pasting commands from the browser. The su is disabled, but they cannot disable ssh. All you have to do is ssh into an account in the sudoers list on localhost: ssh <username>@localhost where ...


0

For commands which do not need to be connected to a tty or X server (i.e. a few command-line based admin utilities) you can use su root -c <command> The command may need to be enclosed in quote marks, and you will be prompted for the root user's password. Note that this requires the root account to be enabled, which it is not by default on Ubuntu. I ...


1

you must add the standard user to the /etc/sudoers files to give them priviledges to run elevated commands. For example with a user called 'demo': demo ALL=(ALL:ALL) ALL The first field indicates the username that the rule will apply to (demo). The first "ALL" indicates that this rule applies to all hosts. The second "ALL" indicates that the demo user ...


1

Start your Python script inside your programm with su -c '<your_python_script>' - <your_user_name> Examples $ sudo su - $ whoami root $ su -c 'whoami' - aboettger aboettger or as script with the name foo #!/bin/bash whoami su -c 'whoami' - aboettger exit 0 example output sudo ./foo root aboettger



Top 50 recent answers are included