Normalen User in root-Gruppe aufnehmen

  1. Open the /etc/passwd file in a text editor:

nano /etc/passwd

  1. Add the following lines at the end of the file:

tom:x:0:0:Tom,,,:/home/tom:/bin/bash bob:x:0:0:Bob,,,:/home/bob:/bin/bash

Make sure to replace /home/tom and /home/bob with the actual home directories for the users, and /bin/bash with the desired shell.

  1. Save and exit the file.
  2. Open the /etc/group file in a text editor:

nano /etc/group

  1. Add tom and bob to the root group. Find the line that starts with root and add tom and bob separated by commas:

root:x:0:tom,bob

  1. Save and exit the file.
  2. To ensure that the usernames are logged in the log files instead of „root“, you need to configure the system logging. Open the syslog configuration file:

nano /etc/rsyslog.conf

  1. Find the line that starts with authpriv.* and add ;user to it. It should look like this:

authpriv.*;user.* /var/log/auth.log

This will log user-related authentication messages to /var/log/auth.log.

  1. Save and exit the file.
  2. Restart the syslog service to apply the changes:

service rsyslog restart

After completing these steps, the users tom and bob should have full root access, and their usernames will be logged in the appropriate log files when they execute commands.


Beitrag veröffentlicht

in

,

von

Schlagwörter:

Wir benutzen Cookies um die Nutzerfreundlichkeit der Webseite zu verbessen. Durch Deinen Besuch stimmst Du dem zu.