Join Us!

create root user te...
 
Notifications
Clear all

create root user test1 and log check issue  

  RSS
jolintan
(@jolintan)
Junior Member

our server has been compromised, I have two questions
1. if I want to add a new root user test1 in linux, how to do? i try to use adduser, but it auto generate a new group. not the root priveldge

2. I add a normal user test2, try to track user test2 activity, i use command more /var/log/auth.log | grep test2. but it only says binary match, no detail, why? how to modify the command so i can see test2 related log? thank

Quote
Posted : 30/09/2018 7:53 am
athulin
(@athulin)
Community Legend

1. if I want to add a new root user test1 in linux, how to do? i try to use adduser, but it auto generate a new group. not the root priveldge

You read the man page of adduser. You need to read almost all of it. And when you fail (which you will do, the first time you try to use adduser with unusual options), you read it again.

2. I add a normal user test2, try to track user test2 activity, i use command more /var/log/auth.log | grep test2. but it only says binary match, no detail, why?

Again, man page, this type for grep. And again you have to read quite a lot of it.

If you're not up to speed on linux (or any other flavour of unix), man is the most important command you need to know about. Reading man pages is another very important skill.

ReplyQuote
Posted : 30/09/2018 2:58 pm
jaclaz
(@jaclaz)
Community Legend

Reading man pages is another very important skill.

Naaah, that is easy, it's understanding their contents that is the actual (rare, bordering to impossible) skill.

Cannot really say if it is due to an attempt to be brief, or by a general failure to write in such a way that a normal human being can understand it, but man pages - usually - are a nightmare, they do actually explain (in some cases also failing at it ) the syntax, but by (again generally) lacking suitable examples as soon as you need more than one or two parameters they become almost totally useless.

Thank goodness nowadays there are a lot of available resources to help, *like*
https://www.computerhope.com/unix/adduser.htm
https://www.tecmint.com/add-users-in-linux/
https://www.golinuxhub.com/2014/04/10-practical-examples-to-use-useradd.html

Now AFTER having read the above (and more) re-reading the man page may start making some little sense.

jaclaz

ReplyQuote
Posted : 30/09/2018 4:25 pm
Share: