After installation CentOS need to manually configure the necessary environment variables, otherwise it is inconvenient to use. The following is a new installation of CentOS problems, to solve.
One, ordinary users can not use a lot of commands
The Echo $PATH is executed separately under the normal user and root user, and four addresses are missing from the average user's PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/kerberos/sbin and Ifconfig just in Sbin inside. Modify the/home/user/.bash_profile to add/sbin:/usr/sbin:/usr/local/sbin:/usr/kerberos/sbin these paths after path.
namely path= $PATH: $HOME/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/kerberos/sbin
Source/home/xxx/.bash_profile can then be executed at the terminal
Two, root user many commands also cannot execute
Execute command under root user echo $PATH, generally less/sbin,/usr/sbin,/usr/local/sbin. Causes the Visudo command to be used to add permissions for ordinary users to use the sudo command. Modify the Global environment variable. Add the export path= $PATH at the end of/etc/profile:/sbin:/usr/sbin:usr/local/sbin. Then enter source/etc/profile on the terminal.
The root user can then basically execute all commands.
Third, ordinary users add sudo permissions
In the case where two has been completed, enter at the terminal:
The command is the edit/etc/sudoers file.
In the line root all= (all), add the following:
Usrname all= (All)
Then save the exit. The normal user can use the sudo command.