Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi guys,
I’ve RHEL 7.4 and I did some changes in /etc/default/grub.cfg and want to update with grub2-mkconfig, when I’m ruining the command I’m getting command not found, I tried also grub-mkconfig
Please advise
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by avihuh
Hi guys,
I’ve RHEL 7.4 and I did some changes in /etc/default/grub.cfg and want to update with grub2-mkconfig, when I’m ruining the command I’m getting command not found, I tried also grub-mkconfig
Please advise
While you really should be asking Red Hat this since it's a subscription based distribution;
The reason grub-mkconfig doesn't work is because there is no such command. But, the grub2-mkconfig should work given that's the command you need. Given CentOS is basically the free version of RHEL and I can see it on my system; are you trying to to run it as root ?
I’ve RHEL 7.4 and I did some changes in /etc/default/grub.cfg
It would be useful if you posted the actual changes you made. Also, the actual file you made the changes to as there is no grub.cfg file in /etc/default but there is a grub file. Which did you edit and what did you edit?
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
Quote:
Originally Posted by ondoho
...
Code:
update<Tab><Tab>
(update-grub)
The "update-grub" script does **NOT** exist in CentOS/RHEL - I've already given the command they need to use in post #2.
I've also already told them how to check if the command they do need is present on their system or not. Furthermore, CentOS/RHEL do not use sudo by default.
Distribution: Currently: OpenMandriva. Previously: openSUSE, PCLinuxOS, CentOS, among others over the years.
Posts: 3,881
Rep:
I made the point about sudo for the OP's benefit (and anyone else that reads this thread). So, yes, here we go again, because you decided to just assume that because other distributions use the "update-grub" script, that means that CentOS/RHEL also do.
The "root user" and sudo are not one of the same thing, although yes, you would obliviously use sudo to get root permissions. You can use the "su" command to switch to any user, although, yes, it's correct to my way of thinking to assume that it's usually the "root user" that you would "switch to" with the "su" command. And what I use to be root on my system - I'm not saying you're wrong about that particular point - but it doesn't have to be root though.
Last edited by jsbjsb001; 10-14-2018 at 08:09 AM.
Reason: typo
I am sure that the OP appreciates the finite comments by everyone but I feel it could be better addressed by everyone;
Quote:
From LQ Rules Challenge others' points of view and opinions, but do so respectfully and thoughtfully ... without insult and personal attack. Differing opinions is one of the things that make this site great.
DESCRIPTION sudo allows a permitted user to execute a command as the superuser or another user, as specified by the security policy. The invoking user's real (not effec‐
tive) user ID is used to determine the user name with which to query the security policy.
sudo supports a plugin architecture for security policies and input/output logging. Third parties can develop and distribute their own policy and I/O logging
plugins to work seamlessly with the sudo front end. The default security policy is sudoers, which is configured via the file /etc/sudoers, or via LDAP. See the
Plugins section for more information.
And
Quote:
From 'man su'
su - change user ID or become superuser
SYNOPSIS
su [options] [username]
DESCRIPTION The su command is used to become another user during a login session. Invoked without a username, su defaults to becoming the superuser. The optional argument
- may be used to provide an environment similar to what the user would expect had the user logged in directly.
Additional arguments may be provided after the username, in which case they are supplied to the user's login shell. In particular, an argument of -c will cause
the next argument to be treated as a command by most command interpreters. The command will be executed by the shell specified in /etc/passwd for the target
user.
You can use the -- argument to separate su options from the arguments supplied to the shell.
The user will be prompted for a password, if appropriate. Invalid passwords will produce an error message. All attempts, both valid and invalid, are logged to
detect abuse of the system.
The current environment is passed to the new shell. The value of $PATH is reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin for the
superuser. This may be changed with the ENV_PATH and ENV_SUPATH definitions in /etc/login.defs.
A subsystem login is indicated by the presence of a "*" as the first character of the login shell. The given home directory will be used as the root of a new
file system which the user is actually logged into.
My suggestion to the OP is to learn to use the 'man command' to understand usage.
Everyone please note the underlined text above.
su refers to switch "switch user" whereas sudo stands for "switch user and do", more specifically, "switch user, refer to sudoers file to check what can be done with this user then do the command if is allowed"
in other words, the sudo system (the sudo command and the sudoer file) is an evolved form of su as an attempt to provide a tool to administer the chaos of allowing users to become other users for tasks inside the system
no source, you will have to believe me
Last edited by ARCHON_YOONITZ?!?!; 05-08-2020 at 03:22 AM.
Reason: spacing between emos xD
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.