Questions tagged [su]
command for substituting user i.e. logging to a session as a different user.
184
questions
0
votes
0
answers
64
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 ...
0
votes
0
answers
26
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
2
votes
2
answers
137
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 ...
0
votes
0
answers
198
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
0
votes
0
answers
61
views
Logout/exit from 'su <otheruser> takes > 1 minute
If I 'su root' or 'su <other_user>' from my user login account and then logout (or exit), it takes about 1 minute for the logout to complete and return me to my user shell.
During that minute ...
0
votes
1
answer
341
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 &...
2
votes
2
answers
727
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 ...
0
votes
1
answer
31
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=:...
0
votes
1
answer
350
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 ...
1
vote
0
answers
56
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 &...
0
votes
1
answer
192
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 $...
0
votes
0
answers
71
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 /...
0
votes
2
answers
34
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 ...
0
votes
1
answer
49
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 ...
0
votes
1
answer
2k
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
...
0
votes
0
answers
1k
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 ...
0
votes
1
answer
28
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?
1
vote
1
answer
1k
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/...
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 ...
0
votes
1
answer
308
views
su Authentication failure when switching to non-root with password
I know the password of gqqtest as I can login via ssh.
> psftp gqqtest@172.25.9.11
Using username "gqqtest".
gqqtest@172.25.9.11's password:
Remote working directory is /home/gqqtest
Now ...
1
vote
1
answer
3k
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 ...
0
votes
1
answer
197
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 ...
0
votes
1
answer
167
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"
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 ...
0
votes
1
answer
537
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 ...
1
vote
0
answers
1k
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 ...
-2
votes
1
answer
651
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.
2
votes
0
answers
72
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 ...
1
vote
3
answers
6k
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:
...
1
vote
1
answer
401
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 ...
1
vote
0
answers
312
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 ...
2
votes
1
answer
109
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?
3
votes
1
answer
332
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 ...
0
votes
0
answers
30
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/...
1
vote
1
answer
2k
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
...
0
votes
3
answers
15k
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, ...
2
votes
0
answers
843
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 ...
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 ...
0
votes
2
answers
2k
views
Using environment variables with su -c
I try to run nvm as a different user from a bash script. It is installed already and the NVM_DIR environment variable is set in /home/user/.bashrc:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ]...
0
votes
0
answers
99
views
Can't login to root account
I restricted the use of su by creating an admin group
sudo usermod -a -G admin "admin user"
sudo dpkg-statoverride --update -add root admin 4750 /bin/su
Later I regretted this so I removed the ...
1
vote
1
answer
1k
views
sudo is not installed, both sudo and su are not working
When trying to switch to root using sudo su :
Error- sudo is not installed
When trying to switch with su command:
Error- this program is not installed
$ cat /etc/os-release
NAME="Ubuntu"
VERSION="...
1
vote
1
answer
3k
views
Can not root: after removing ZSH and returning to default bash
I can not $ sudo su everytime, I enter the command, the terminal says :
can not execute /usr/bin/zsh no such file or directory
How to return to default bash of Ubuntu and make bash as default ...
0
votes
0
answers
46
views
SOLVED Switching user in automated scripts like cron jobs
If I run su -c "notify-send test" myusername as root, the command will be executed by myusername (me).
But if I place a script in /etc/cron.daily or /lib/systemd/system-sleep and it is ...
8
votes
1
answer
15k
views
gpg: problem with the agent: Permission denied
GPG fails with gpg: problem with the agent: Permission denied when I invoke it after switching my user with su:
su - user2
gpg --symmetric --passphrase=foo foo.txt
If I invoke the command from my ...
0
votes
1
answer
75
views
I can login using su in other accounts, but not using login screen
When I try to login to my administrative account using Ubuntu's login screen, I cannot. However, I can access other accounts and log in to them. Additionally, I can login to my account using su ...
1
vote
1
answer
223
views
Prompt has been changed after upgrade to 18.04.1 after using "su" to change user
Just updated to 18.04.1 I use Terminal only. When I do an su to one my users that runs a game, I only get a $ and no name of the user and does not show current location. Also, tab autocomplete ...
1
vote
1
answer
1k
views
after su, the script stops working
we are running script the the first command in it is
su (switch user)
and after that other command:
#!/bin/bash
su sys_osrqa
whoami
pwd
but when the script run, it asks for password, and after we ...
0
votes
1
answer
309
views
Reset permissions on (K)Ubuntu 18.04: newly created user gets "Cannot execute /bin/bash: Permission denied"
so I seem to have screwed up some permissions on my Ubuntu desktop system. I wanted to let a newly created user only grant access to one single folder (to run in terminal only one app within that ...
0
votes
1
answer
135
views
Cannot switch user - Error Code: 1
I'm in an interesting situation where I'm trying to log in to my headless Ubuntu instance in the cloud and I cannot switch to one of my users.
Here's what I'm trying:
login_id@cloud_machine:~> su ...
0
votes
0
answers
75
views
Troubleshoot local printer with journalctl command with elevated privileges
Since root passwd is disabled i can't invoke su -c 'journalctl -u cups.service --since="None" --until="2018-07-03"' > troubleshoot-logs.txt I'm looking for sudo analogue