Skip to main content

Questions tagged [su]

command for substituting user i.e. logging to a session as a different user.

Filter by
Sorted by
Tagged with
0 votes
2 answers
124 views

su-ing won't work

I want to run something with root privileges without making a user an admin/granting them sudo-ing power (effectively making them an admin). Therefore I wanted to test: su adminuser echo "Hello ...
Lucy Ciara's user avatar
0 votes
1 answer
91 views

Cant log from local (keyboard) only using ssh plus "sudo su" give error:

I was messing with limits.conf and 99-sysctl.conf, and I became unable to access my system locally (i.e. using a keyboard). I cannot log in as any user, not even as root. I can only access my system ...
P1ro's user avatar
  • 11
0 votes
0 answers
41 views

sudo doesn't working in Ubuntu 22.04 [duplicate]

I am going to update packages in Ubuntu 22.04 terminal. sudo apt update But I get errors like this. [email protected]:~$ sudo apt update [sudo] password for user: tester is not in the sudoers ...
bigant02's user avatar
  • 101
0 votes
0 answers
77 views

How do I change ownership of '/usr/libexec/sudo/sudoers.so' when it's stopping 'sudo' and 'su' from working properly?

any time I use sudo for any command I get the following errors: sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy" sudo: /usr/libexec/sudo/sudoers.so must be owned ...
Tareq Ewaida's user avatar
0 votes
1 answer
168 views

Prevent password change prompt when switching users with su as root

I am working with an Ubuntu system (22.04) and I have set a user's password to expire using the chage command by executing chage user1 -d 0. This prompts the user to change their password upon the ...
Utz's user avatar
  • 79
0 votes
1 answer
495 views

Unable to login to root after running ansible scripts

I am currently not able to login to my super user. Here is the sequence of events ~ su password: su: using restricted shell which zsh su: failed to execute which zsh: No such file or directory ...
Archer Heffern's user avatar
0 votes
1 answer
3k views

is not in the sudoers file. this incident will be reported and authentication failure at the same time

I tried to install something with sudo but I received: ".... is not in the sudoers file. this incident will be reported". I used "su -" and "su root" to fix this problem ...
Retvik's user avatar
  • 1
-1 votes
2 answers
3k views

All users locked - login not possible

attached you can find the terminal of my homebridge account. The only account which is actually able to logon: homebridge@raspberrypi:/var/lib/homebridge $ su pi su: Authentication failure homebridge@...
Marcusg562's user avatar
7 votes
2 answers
3k views

Can't use su command to interactively login as another user

I am currently using ubuntu 20.04 machine. I created a user with password using the useradd command. I need to change the PATH variable of that user. So i used su - <username> to interactivelly ...
Alakananda S's user avatar
5 votes
1 answer
717 views

How to build "su" from sources?

Try to build custom "su" on Ubuntu 20.04, but start from original sources for test (without changes). Run apt-get source login I got shadow-4.8.1 dir. Run ./configure make and try run src/...
Flibustero Blanco's user avatar
5 votes
1 answer
24k views

su: user does not exist or the user entry does not contain all the required fields

In Ubuntu Studio 22.04 LTS I usually log in as a non-privileged domain user. If I need to perform an administrative task (in a terminal window), I have previously used "su" to change to a ...
R B's user avatar
  • 316
2 votes
1 answer
760 views

When I run sudo -i or sudo su I get an error

Error when running sudo su: su: failed to execute /bi: No such file or directory Error when running sudo -i: sudo: /bi: command not found How do I fix this error?
marbens's user avatar
  • 217
0 votes
0 answers
41 views

su and sudo commond could not work

apt install and update commands need the read and write of root or administrators. but it does not work now. $ sudo sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set $ su ...
CY Zhung's user avatar
0 votes
0 answers
2k views

su: Permission denied as root

I added my Ubuntu Machine to AD and I can do an ID these user accounts but when I'm logged in as root I can't su to these accounts e.g. su: Permission denied any reason why? is there something I miss ...
John R's user avatar
  • 9
0 votes
0 answers
106 views

su command wont allow PW entry

I tried to get some files from a damaged Ubuntu OS on an USB stick using su in terminal and terminal wouldn't let me enter the password or type anything at all
lolo's user avatar
  • 1
2 votes
2 answers
925 views

Unable to edit Software Sources (and various other things) due to Run as root - KDE su prompt "Permission denied"

I cannot seem to get any of the KDE su prompts on my Ubuntu Studio install to work. I have set a password for the root account via the terminal and have successfully logged on as root via the terminal ...
Keith Jackson's user avatar
-1 votes
1 answer
4k views

sudo su command not working su: failed to execute root: No such file or directory

su: failed to execute root: No such file or directory
Deep Uppal's user avatar
0 votes
1 answer
2k views

user-name is not in sudoer file and su authentication failure

when using sudo command, I met the error: "uers-name is not in the sudoers file, and this incident will be reported". And then I tried some answers in the internet, such as "su root &...
blender987's user avatar
4 votes
2 answers
8k views

How do you disable su?

I'm confused about su a bit. I just want to prevent users from using su across the board. Authorized users will have sudo access so they can be root if desired. We just want to completely disable su ...
bluesquare's user avatar
0 votes
1 answer
65 views

Playing sound from account accessed with su or ssh

I have two accounts. jamesk and other I can run X windows applictions using the other account in a couple of ways: ssh -X other@localhost xhost + followed by su - other and the then export DISPLAY=:...
James K's user avatar
  • 248
0 votes
1 answer
1k views

'su' command without a passwd prompt in a remote machine while connected through and ssh session using python's paramiko library

I am writing a python script to automate ssh connection to a remote machine. When connected to the remote machine using python's Paramiko library, if I need to elevate privileges (specifically to ...
Izhar Hussain's user avatar
1 vote
0 answers
100 views

Difference in behaviour between su and sudo

I'm trying to understand the following difference I observed when running commands using sudo and su. I've simplified it to the most simple form. Consider the following two commands: su - myuser -c &...
Krzysztof J. Obara's user avatar
1 vote
1 answer
3k views

sudo su not working as it should. Any ideas?

I have searched this page for a similar question but found none. I use ubuntu 20.0 on hp workstation. Anytime I use $sudo su and input the root password the system gets stuck. Although when I use $...
Ssap's user avatar
  • 13
0 votes
0 answers
563 views

su command in /usr/bin

I have an udev rule that runs a command as root. I have two different machines running on ubuntu and the su command in these machines are located in different locations. In one computer is located in /...
user1571823's user avatar
0 votes
2 answers
196 views

How to get variable environment from parent user?

I need to know how it's possible to get environment variable from a parent user after su? For example if I'm evan user and I have variable $DISPLAY=:10.0, then I use "su -" to go to root ...
antonio1's user avatar
0 votes
2 answers
463 views

notify-send to other user by crontab

I have script what is running by crontab but as su, at some point is possible that it will send notify by notify-send but I want to this to specific user (login is in $2, but only one will be logged ...
Simon Hryszko's user avatar
0 votes
1 answer
6k views

How to switch from root to user in Ubuntu running in Termux?

I recently installed Ubuntu via Termux on my android phone. This version is specified when I enter the username and password. Welcome to Ubuntu 20.04.2 I once went from root to user mode by adduser ...
BullShit's user avatar
2 votes
0 answers
2k views

How to fix bug "Authentication is needed to run '/usr/share/-apport/dump_acpi_tables.py' as the super user"?

I get an internal error (involving xorg), logging me out and then I have to log back in (restarting any apps, since they were all closed), then I get this error, which I've seen is a bug, but I'm not ...
user14094230's user avatar
0 votes
1 answer
132 views

login as user X rejected

Adding a user like so: sudo useradd juliet -p juliet -s /bin/sh and then typing su - juliet Password: Get the error: su: Authentication failure Why? And how do I change user?
user avatar
1 vote
1 answer
4k views

How to switch user (su) to the odoo account? (This account is currently not available error.)

How do I su to the odoo account? nicholas@mordor:~$ nicholas@mordor:~$ sudo su odoo - This account is currently not available. nicholas@mordor:~$ nicholas@mordor:~$ awk -F: '{ print $1 }' /etc/...
Nicholas Saunders's user avatar
0 votes
0 answers
38 views

Ubuntu 20.04.1: No ability to use sudo and su [duplicate]

I just installed Ubuntu 20.04.1 and I must have screwed up. I have just one user account and with this account I'm unable to use sudo and su. This obviously prevents me from running apt-get and doing ...
reacher33's user avatar
0 votes
1 answer
4k views

su Authentication failure when switching to non-root with password

I know the password of gqqtest as I can login via ssh. > psftp [email protected] Using username "gqqtest". [email protected]'s password: Remote working directory is /home/gqqtest Now ...
Gqqnbig's user avatar
  • 689
1 vote
1 answer
9k views

SSSD with AD: use UID/GID specified on domain server instead of something random?

I have an AD environment with IDMU and specified UID/GID for my domain users. SSSD-connected domain user does not share the same UID/GID on Ubuntu as AD. Here's the default unedited sssd.conf in ...
Avery Freeman's user avatar
0 votes
1 answer
293 views

How to change subtitle user's home directory?

I added a user (user2) in a WSL2 environment and then wanna change that user2's home directory to a different directory. But something must be wrong. $ usermod -d /var/lib/app1 user2 usermod: no ...
vinsh_77's user avatar
0 votes
1 answer
879 views

How to execute 'su(switch user)' command without prompting for a password? [duplicate]

Is there any way to execute the 'su(switch user)' command with the password given in the same command itself like su root -p "password"
Aparna's user avatar
  • 1
4 votes
1 answer
1k views

When sudo su vs sudo -i [duplicate]

I am reading some tutorials about Linux configurations: To accomplish many of the configurations is important and mandatory be the root. Well I did realize that in many places are used sudo su and ...
Manuel Jordan's user avatar
0 votes
1 answer
698 views

su doesn't work from regular or sudoers

I'm trying to use su command to change my identity on ubuntu 18.04 But from neither regular user to sudoer user or sudoer to regular user it doesnt work! I get su: Authentication failure The sudo ...
Ariyan's user avatar
  • 504
2 votes
0 answers
2k views

auto pass password to su (no sudo)

I am trying to pipe a password into su so that I can run su in a script and automatically give it a password. I am running this without sudo and attempting to su into root. I have tried this a few ...
Austin's user avatar
  • 241
-2 votes
1 answer
1k views

Why does the su command does not work without sudo [duplicate]

I know it might seem lame but i was just wondering why do we need a sudo command to use su cmd to switch to root user.
Rounak's user avatar
  • 1
2 votes
0 answers
73 views

Why on Ubuntu 18.04 command "sudo -u username -s" not works as on CentOS 7? [duplicate]

I want to use a system user to separate permissions when I run nodejs scripts. I created node-user: sudo useradd -r -m node-user Then I expected that next command login me in shell node-user: sudo ...
ktretyak's user avatar
  • 121
1 vote
3 answers
7k views

Permission denied creating directory after switching user

I switched to a different user with the su command, and now I want to create a file/folder but "permission denied" error appears. safi_test4@safi-VirtualBox:/home/safi$ su safi_test4 Password: ...
safi jinji's user avatar
1 vote
1 answer
664 views

Ubuntu script that runs commands after su - user

Ubuntu 18.04.3 LTS (GNU/Linux 5.0.0-31-generic x86_64) GNOME Shell 3.28.4 GNU bash, version 4.4.20(1)-release (x86_64-pc-linux-gnu) Typically, su - user is called in a terminal and the user then ...
Kenivia's user avatar
  • 267
1 vote
0 answers
432 views

su {user} not working inside the ssh shell on the server

I am trying to connect to the server as root using ssh command in Ubuntu bash. I use ssh -p port root@ip to connect to the server and the config of ssh is a password-less connection ssh with the ...
AlirezaAsadi's user avatar
2 votes
1 answer
155 views

Installing windows 7 on virtual Box in my Ubuntu 18.04 [duplicate]

Helo there,, while am installing windows 7 on virtual box in my ubuntu is it a must that i have a flashdisk or i can just choose the iso file directly?
Lizzy's user avatar
  • 21
3 votes
1 answer
702 views

Konsole starts in SU mode and asks for password in every window and tab

I am a bit of a newby and I have stumbled upon an annoying thing. Everytime I open a konsole, it is in su and asks for my password. I have searched around and tried all the things recommended on this ...
Linda's user avatar
  • 103
0 votes
0 answers
32 views

Files saved on external drive with Ubuntu 14 have different permissions when displayed with Ubuntu 16

I saved my data on an external drive using a Ubuntu 14 machine. In that Ubuntu 14 machine, I can see in the following: david@david-Toshiba:/media/david$ pwd /media/david david@david-Toshiba:/media/...
Dave's user avatar
  • 202
1 vote
1 answer
3k views

sudo does nothing and su doesn't accept my password

When I type sudo, the command doesn't seem to do anything useful. I expected to be asked for my password or to get a root shell, but instead I only get this: $ sudo usage: sudo -h | -K | -k | -V ...
user avatar
0 votes
3 answers
24k views

How to elevate privileges to root in bash and return back?

How to elevate privileges to root in bash? And then how to return back to exactly the previous state? My question is both about elevating/decreasing privileges and possible troubles with some apps, ...
J. Denver's user avatar
3 votes
0 answers
1k views

"sudo su -" vs. "sudo -i" and /etc/environment

On an Ubuntu 14.04 host that I frequently update (apt-get update followed by apt-get full-upgrade) I have an /etc/environment file with some critical variables in it. Until recently sudo -i -u fred ...
cjs's user avatar
  • 334
3 votes
1 answer
3k views

How can I install sudo without using su? [duplicate]

I need to use sudo but when I try to use it, a prompt tells me the command is not found and I need to install sudo. So when I switch to su so I can gain root access to install sudo, it says auth ...
Gijs Claes's user avatar