LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to switch to another user but not in console just in the whole ubuntu? (https://www.linuxquestions.org/questions/linux-general-1/how-to-switch-to-another-user-but-not-in-console-just-in-the-whole-ubuntu-4175675425/)

DeanAnderson 05-17-2020 01:22 PM

how to switch to another user but not in console just in the whole ubuntu?
 
In console shell it is easy:
su new_user
then enter password.
But when edit file from user home in some text editor (not in vim in console), I cannot save file. I have to switch user also somehow in ubuntu and I don't know how.

teckk 05-17-2020 01:36 PM

Open the text editor as <user>.
Example:
Code:

sudo geany /etc/fstab

shruggy 05-17-2020 01:58 PM

Does this answer work for you? (Lock the screen, switch to another user from the locked screen).

michaelk 05-17-2020 03:47 PM

When you just use the su new_user, you switch to the new user but remain in same directory even if you do not have permission to read or write with the old users environment.

If you use su - new_user versus just su new_user you switch to the new users environment and are automatically moved to the new_users home directory.

BW-userx 05-17-2020 04:44 PM

Logout and in as different user

mredc 06-14-2020 10:29 AM

I am curious as to whether any of these suggestions worked for the original poster. If so, which one(s).


All times are GMT -5. The time now is 10:02 AM.