Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's 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.
It has been a week since I've installed Fedora v.11 on my laptop and from the very beginning I couldn't log as a root (when I try to log in as root it prints: cannot identify user), execute 'sudo su' in terminal (couldn't figure why). Just recently I've discovered that the problem is with my /etc/sudoers file as there isn't any entry for normal users. Unfortunately I've absolutely no idea how I can change this file...
(it belongs to root, is -r-r--- and as I said - I cannot log in as root!)
Is root user enabled in your system? there are some distros that defaults to no root.
Usually to create a sudo user you only need to use the user applet in the menu>admin>users. There create a new group named after your user name. Group=Username. Then make your username a member to that group. that's it. your should be able to sudo su and acquire root power.
I've even added myself to 'root' and 'adm' in order to be in sudoers but it didn't help.
And how to enable root in system? There is 'root' user and 'root' group but I cannot log in.
If you're able to add yourself to new groups, I am inferring that you can still sudo - have you tried `sudo passwd root`? Also, FYI, you never modify /etc/sudoers directly. There is a command `visudo` that opens an editor on it and then applies the changes, as otherwise they wouldn't be reflected immediately. Try sudoing that if you need to change sudo settings for this.
From the output it looks like you have SELinux enabled, just that the SELinux policy is not blocking you.
You can enable sudo in the sudoers file with the following(if you want without password), is not commented:
%wheel ALL=(ALL) NOPASSWD: ALL
and then add your user to the wheel group.
If you desperately want root you can jump to init 1.
[michal@michal ~]$ sudo su
[sudo] password for michal:
michal is not in the sudoers file. This incident will be reported.
[michal@michal ~]$ visudo
visudo: /etc/sudoers: Permission denied
visudo: /etc/sudoers: Permission denied
neither can I login as root (how to enable it? Couldn't find this option in system->admin->users)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.