I have mysql 8.0 work under centos 7 minimal. I change the password using this command mysqladmin -u root -p’Pass-123***’ password Myp@$$123 . After this , i try to access to mysql via mysql -p but i cannot access with the new password. How i can do this ? Answer You changed the password commandline on Linux. In sh/bash/zsh the
Tag: root
Detect if running on a device with heterogeneous CPU architecture
I’m very specific on this one. I need to know if the device has a CPU which has heterogeneous cores like ARM’s big.LITTLE technology, for instance, a set of 4 ARM Cortex-A53 + another set of 4 more powerfull ARM Cortex-A72, totaling 8 cores, basically 2 processors in the same chip. The processors model does not really matter. What I’m
Starting container as a non-root user vs starting as root and then downgrade to non-root
I am creating some Docker images and I am reading how others have been doing this. I have identified three general patterns when it comes to the user that runs processes inside the container: It uses root user for everything (spawned process(es) inside container run under root). It uses root user, does some stuff, then downgrades to non-root user (so
Read /proc//fd/ without full root access
I have a program (https://github.com/raboof/connbeat) that relies on /proc/[pid]/fd/* to find processes given a (networking) inode. /proc/[pid]/fd can only be read by root, but I’d like to drop privileges as much as possible for security. Is there some way I could (efficiently) get to the relationship between processes and inodes without requiring full root rights? Perhaps some syscall that I
Acessing to /root folder on BeagleBone (Debian) after /usr directory was deleted
I have had some .cpp programs in root directory of my BeagleBoneBlack (Debian). Due to a studpid accident a /usr directory was deleted on my BeagleBone. It make sense for me now, that I can not access the BeagleBone anymore. What I can do is to boot the BeagleBone from SSD-card, but of course I come in this case to
Execute root command with no root user avoiding password prompt
I have a script.sh file executing the following command: If i try to execute with a non-root user (username = marco), the prompt password halts the script waiting for the input. I’m trying to configure the /etc/sudoers file adding the following lines, but with none of them works and I’m always prompted for sudo password: Any clue? Thank you. Answer
Root autentication on a Python program
I have the root password saved in a variable. How I can give the root authorization at my program? This can be an example: Answer It is impossible to do it in the way you try. Your program is already started under some non-root user and you cannot change it inside this program. You can spawn other process which will
BASH: Check if user is root even when using fakeroot [duplicate]
This question already has answers here: How to check if running as root in a bash script (21 answers) Closed 23 days ago. How can I check whether a user is root or not within a BASH script? I know I can use or but if the script was invoked via fakeroot, UID and EUID are both 0 (of course,
root user of linux spanning lots of processes of python script uncontrollably
I wrote a python script to work with a message queue and the script was launched by crontab. I removed from crontab but the root user of my linux system keeps launching it every 9 minutes. I’ve rebooted system and restarted cron but this script keeps getting executed. Any idea how to keep it from happening? Answer If you start
setuid(0) fails to execute for root owned program
I need to write some code which can gain root priveleges and execute system level operations. Here’s what I’ve written (this is not the actual code, just to test if I’m doing things correctly or not): After doing gcc -o setuid setuid.c, I run ls -al on this to get following results: Trying to run the application results in: I