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
0answers
25 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
1answer
14 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
1answer
139 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
0answers
107 views

Su command authentication failure on Ubuntu 20.04 LTS

I have been operating Ubuntu 20.04 LTS remotely. To run a shell script suited for tcsh environment I had to change my shell from bash to tcsh. I did it using chsh command being in the root. However, I ...
0
votes
0answers
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
1answer
56 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
1answer
503 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
0answers
272 views

Allow Switching User Without Password & Without sudo If User Belongs To A Group

On an Ubunutu system with users foo, tom, jack and peter, where foo, tom and jack belong to the group foo peter does not belong to the group foo How can we configure the system such that both tom ...
0
votes
1answer
135 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
1answer
78 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
1answer
741 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
1answer
373 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 ...
0
votes
0answers
729 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
1answer
381 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
0answers
71 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
3answers
4k 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
1answer
326 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
0answers
273 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
1answer
97 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?
2
votes
1answer
170 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
0answers
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
1answer
1k 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 ...
-1
votes
3answers
8k 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
0answers
611 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
1answer
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
1answer
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
0answers
87 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
1answer
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="...
0
votes
1answer
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
0answers
42 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 ...
5
votes
1answer
8k 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
1answer
39 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
1answer
138 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
1answer
958 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
1answer
267 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
1answer
107 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
0answers
58 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
0
votes
1answer
7k views

su: Authentication Failure, stopped working

I recently installed Ubuntu 18.04. I used su command, entered my accounts password. It worked successfully for few times. Then I got Authentication Failure, now I'm not sure if I entered wrong ...
0
votes
0answers
21 views

Can't sudo unless I su as another user and then su back to my account? [duplicate]

user@greeneyes:~$ sudo apt-get install xdotool user is not in the sudoers file. This incident will be reported. user@greeneyes:~$ su verelse Password: verelse@greeneyes:/home/user$ su user Password: ...
0
votes
2answers
856 views

How do I run the install.sh file for this wi-fi adapter? I get “su: Authentication failure”

I have got a 600m wireless-n mini USB adapter from Realtek, model number OT-wua600nm. I'm trying to install through drive. I copy the file (linux) and paste into desktop and change the permissions ...
0
votes
1answer
1k views

Is it possible to run a command within a login shell using sudo or su?

I'm trying to run a non-interactive command within a login shell (using su - or sudo -i) but couldn't make it work so far. Within ~/.bashrc I have sourced a script which sets all variables my ...
1
vote
2answers
744 views

Set up sudo so that a particular common user can edit /etc/fstab

How can I set up sudo so that a particular common user can edit /etc/fstab? I've thought to edit /etc/sudoers.d file to do this, but how do we edit /etc/fstab in this file?
1
vote
1answer
85 views

After upgrade, rc.local now gives su must be ran from a terminal in rc.local

I have a few Ubuntu systems which use the su command from within the rc.local script. This updates a users git repo on the local machine, so its important that the ownership of files is kept to the ...
0
votes
1answer
8k views

writing a bash script that uses sudo [duplicate]

I am sure that this is a very basic question but I'm afraid that I have been unable to get it to work or understand what is going on. I have a node project that I usually run with sudo npm start ...
-1
votes
1answer
133 views

How can I access my files when I'm not logged in with my admin account (i.e. as a guest)? [duplicate]

I can no longer access my regular administrator account on my Ubuntu (see Ubuntu won't log me in with correct password) however I really need to access my files. I can only get on the PC with a ...
4
votes
1answer
3k views

Unable to enter superuser using su

Whenever I try to run su Password: Then it shows error setgid: Operation not permitted This problem arose after I changed permissions using chown Output of ls -lsa /bin/su is: 40 -rwxrwxr-x 1 ...
0
votes
1answer
167 views

Dell first boot failed, result in no session created

I just receive my brand new dell laptop wich is chiped with a pre-installed ubuntu-dell image. So I did the first boot to create my account and an "unrecoverable error" (or similar) occured and it ...
0
votes
1answer
2k views

How to alias pip to pip3 while using sudo for a specific user?

I have python2 and python3 both installed on Ubuntu 16.04, and use python3 primarily. I have both pip and python aliased to pip3 and python3, respectively, in my user's .bashrc. However, I had always ...
3
votes
2answers
6k views

How do I set environment variable for all users even when doing sudo su?

I created a file named x.sh in the directory /etc/profile.d/ so it should be accessible to all users. I expected when I change the current user in terminal (of logged-in user) using command sudo su ...
1
vote
1answer
1k views

Collecting user password via GUI in a script

I know that using the sudo and ssh tools it is possible to use GUI to ask for a password in a script by setting, respectively, the SUDO_ASKPASS and SSH_ASKPASS variables in which we specify a ...