Link to home
Start Free TrialLog in
Avatar of gudii9
gudii9Flag for United States of America

asked on

what is unix psuedo commandd and how to use it

Hi,
I looged in as xyz user and trying to delete a file in the server domian directory which was created by user say John. how to psuedo to john and delete that file.

what is unix psuedo commandd and how it wrks in unix world. please advise
Avatar of Nathan Riley
Nathan Riley
Flag of United States of America image

You can change of to the username from root easily like this:

su - John

Open in new window

SOLUTION
Avatar of Lee W, MVP
Lee W, MVP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gudii9

ASKER

You can change of to the username from root easily like this:

what is meaning of root.
why i have to go to root. what i can do from root what i cannot do from root. what i can do using my user.
how unix allows logging in as different user say John when i logged in as say xyz

any online link or free video tutorials explaining all these concepts? an how to practice please advise
The root user is the unix administrator account.  It's the account that has full access to everything on the file system and in the OS.  Unix has always allowed changing user context.  Originally you used the su (superuser) command, but that required the other user's password, unless you were running it as root.

The sudo command was created later to allow limited user access through the the /etc/sudoer configuration file.  This command makes use of the user's own password to change user context.  This allowed you to limit root access to a more limited command subset if you so choose.  It can also be set to give a user full access to all root user commands.

If you want to learn Linux, I suggest starting from the beginning to get some basic concepts before you try to comprehend how root, su, and sudo works:
https://www.linux.com/learn/complete-beginners-guide-Linux%20
Avatar of gudii9

ASKER

how to know if i have root access or not?
Run this on the command line and it will report your user name.
whoami

When you run this, it should report root.
sudo whoami
Do you still need help with this?
Avatar of gudii9

ASKER

https://www.tutorialspoint.com/unix_terminal_online.php
tested
sudo whoami

says command not found?
even whoami
says
cannot find name for use id 51239 no such file or directory?
Hi friend

Your original question has been answered. All your subsequent comments are separate questions to that. If you need to you can ask other questions about those things.

The fact you haven't been able use sudo is irrelevant. You have been given several correct answers to your original question.

Please digest the information you have been provided with and put some time and effort into learning about how sudo functions.

Bon chance mon ami!

Cheers, JP
..cannot find name for use id 51239 no such file or directory?
That is a very limited unix/linux tutorial that does not implement the full environment.  It found the ID as 51239, but couldn't associate it with a name.
Self serving closure.  There are 2 answers before John Pope, yet he selects only his own.