change user and list of users accounted on system
This is a basic newbie question. I want to do two things.
I want to check what users and groups have been created for the system, as opposed to checking what users are currently logged on. I'm actually looking for a particular user, if it exists on the machine; so, that's where that question comes from. I also want to know, once I find the user I'm seeking out, how do I log on as another user for a particular program. I'm running nagios, and it says it's running, but I can't interface with it. My guess is I started it with a user that has no business accessing it, if that makes any sense at all. I can use a command called chown, right, but I'm not sure how to use it to make it work for this particular situation. thank you very much. |
Hi, try this to check who is logged in:
Code:
$ who -a to check if user with specified username exists on the system: Code:
$ id skiff More reliable is to check against /etc/passwd, /etc/group: Code:
$ cat /etc/passwd | grep skiff Code:
$ sudo -H -u skiff ls -la but mind, you need to have /etc/sudoers properly configured... |
Thank you so much! I don't even see sudoers; so, I guess that means it has to be configured to work.
Anyway, this stuff is great. I pointed to the correct IP for nagios and it worked. It was a social engineering mistake on my part. I presuppose root has the permissions to run anything it wants! And I'm also presupposing root cannot execute some magic command to see the users' passwords, except by doing some sort of password recovery. The only thing I still don't quite get is the change owner or group for file permissions. How would one change ownership for an entire program, for instance? thank you in advance. |
All times are GMT -5. The time now is 02:17 AM. |