sudo works for some commands and doesn't work for others
by JockVSJock from LinuxQuestions.org on (#57K3N)
Started a new job, where I use RHEL physical servers, I'm npt the Linux admin.
I'm installing Nexus software and the Linux admin stated he put my user in the sudoers file (there is no way for me to confirm this).
I was able to create the following user by using sudo:
Code:sudo useradd -c "nexus admin user" nexusHowever when it came to create the directory structure for the software install under /opt
Code:sudo mkdir -p /opt/nexusI wasn't successful as root:root owns /opt.
So I'm not understanding why sudo works and sometimes it doesn't.
thanks


I'm installing Nexus software and the Linux admin stated he put my user in the sudoers file (there is no way for me to confirm this).
I was able to create the following user by using sudo:
Code:sudo useradd -c "nexus admin user" nexusHowever when it came to create the directory structure for the software install under /opt
Code:sudo mkdir -p /opt/nexusI wasn't successful as root:root owns /opt.
So I'm not understanding why sudo works and sometimes it doesn't.
thanks