Created 02-05-2016 01:48 AM
I checked all files requiered FQDN in /etc/sysconfig/network, /etc/hosts.., and add root ALL=(ALL) NOPASSWD: ALL at end of sudoers file. why it always complain about root is not in sudoers file? and error only occurs when you do 'sudo' as root user.
is it possible a bug in installer?
Created 02-05-2016 07:54 AM
can you please print output of /etc/sudoers file ?
If you have added your user to sudousr file then the cleanest way of doing things is probably to grant the root group to your user. For instance,
to add user oracle to the admin group:
usermod -aG root root
Created 02-05-2016 01:51 AM
Created 02-10-2016 10:38 PM
I don't think root user need to be included in the sudoer file! By default root can su and become any user ,so how does one explain that?
Created 02-10-2016 10:41 PM
@Geoffrey Shelton Okot There was issue with the root user as it had no gid and uid. usermod did help to fix the issue.
Created 02-10-2016 10:56 PM
The root user is the first default user installed on any Linux box install,which automatically creates the group and user assigning root the UID 0 and GID 0 this is a very bizzare case !
Created 02-11-2016 12:23 AM
@Geoffrey Shelton Okot Human error caused this issue. 🙂
Created 02-05-2016 01:59 AM
I start installer, then at intall options, SSH User Account --> root
the next page, confirm hosts, I got this in log every time:
========================== Creating target directory... ========================== Command start time 2016-02-04 20:59:43 root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. Connection to avechdmq1.ae.ge.com closed. SSH command execution finished host=avechdmq1.ae.ge.com, exitcode=1 Command end time 2016-02-04 20:59:43 ERROR: Bootstrap of host avechdmq1.ae.ge.com fails because previous action finished with non-zero exit code (1) ERROR MESSAGE: tcgetattr: Invalid argument Connection to avechdmq1.ae.ge.com closed. STDOUT: root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. root is not in the sudoers file. This incident will be reported. Connection to avechdmq1.ae.ge.com closed.
Created 02-05-2016 04:33 AM
[root@hostx .ssh]# ls
authorized_keys id_rsa id_rsa.pub known_hosts
The first one contains the private key, the second one contains the public key for user root.
Now run the command
cat /root/.ssh/id_rsa.pub > /root/.ssh/authorized_keys
it will add the contents of the root’s file id_rsa.pub to a file authorized_keys.
Therefore, if a user will connect to this machine by SSH and will specify the correct private key, this machine will look up into authorized_keys and will know that this is root.
remember to copy the authorized_keys to all the servers in the cluster
Also check the permissions on the .ssh directory, id.rsa,authorized_keys and id_rsa.pub keys
Created 02-05-2016 07:54 AM
can you please print output of /etc/sudoers file ?
If you have added your user to sudousr file then the cleanest way of doing things is probably to grant the root group to your user. For instance,
to add user oracle to the admin group:
usermod -aG root root
Created 02-05-2016 04:23 PM
@Robin Dong This is the best answer as per my opinion.