Hello,
I am on F31 and have always used sudo. This morning, after a while, I finally rebooted and am on the 5.5.8-200.fc31.x86_64 kernel. However, I appear to have lost my sudo access.
I get: that my username "is not in the sudoers file. This incident will be reported."
Not sure how this happened. How do I get back into sudoers? I am not even sure I, (in fact I think that I do not), have a root account.
Any suggestions? This is strange. Ranjan
-- Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.
On 3/17/20 11:42 AM, Ranjan Maitra wrote:
I am on F31 and have always used sudo. This morning, after a while, I finally rebooted and am on the 5.5.8-200.fc31.x86_64 kernel. However, I appear to have lost my sudo access.
I get: that my username "is not in the sudoers file. This incident will be reported."
Not sure how this happened. How do I get back into sudoers? I am not even sure I, (in fact I think that I do not), have a root account.
It's unlikely that you were ever in the sudoers file unless you added it yourself. Normally the user is in the wheel group to make them admin and allowed to use sudo. What does the "id" command show for you?
Hi,
Thanks!
On Tue, 17 Mar 2020 12:37:07 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 11:42 AM, Ranjan Maitra wrote:
I am on F31 and have always used sudo. This morning, after a while, I finally rebooted and am on the 5.5.8-200.fc31.x86_64 kernel. However, I appear to have lost my sudo access.
I get: that my username "is not in the sudoers file. This incident will be reported."
Not sure how this happened. How do I get back into sudoers? I am not even sure I, (in fact I think that I do not), have a root account.
It's unlikely that you were ever in the sudoers file unless you added it yourself. Normally the user is in the wheel group to make them admin and allowed to use sudo. What does the "id" command show for you?
I did not manually add the user but I have had sudo privileges because I checked the box with regard to administrator privileges while installing long long ago.
I had no idea that id was a command (thanks!) but here is what it says:
uid=1000(username) gid=1000(username) groups=1000(username),7(lp) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
In the above, username replaces my actual user name.
Many thanks again for your help, and best wishes, Ranjan
users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
-- Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.
On 3/17/20 1:02 PM, Ranjan Maitra wrote:
On Tue, 17 Mar 2020 12:37:07 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 11:42 AM, Ranjan Maitra wrote:
I am on F31 and have always used sudo. This morning, after a while, I finally rebooted and am on the 5.5.8-200.fc31.x86_64 kernel. However, I appear to have lost my sudo access.
I get: that my username "is not in the sudoers file. This incident will be reported."
Not sure how this happened. How do I get back into sudoers? I am not even sure I, (in fact I think that I do not), have a root account.
It's unlikely that you were ever in the sudoers file unless you added it yourself. Normally the user is in the wheel group to make them admin and allowed to use sudo. What does the "id" command show for you?
I did not manually add the user but I have had sudo privileges because I checked the box with regard to administrator privileges while installing long long ago.
I had no idea that id was a command (thanks!) but here is what it says:
uid=1000(username) gid=1000(username) groups=1000(username),7(lp) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Somehow you got dropped from the wheel group. Did you uncheck your administrator access in the user control panel? In any case, if you don't have another admin user, you will need to use a live or rescue boot to add yourself back in to the wheel group. Btw, you do have a root account, but it probably doesn't have a password. "sudo -i" will make you root.
On Tue, 17 Mar 2020 13:54:59 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 1:02 PM, Ranjan Maitra wrote:
On Tue, 17 Mar 2020 12:37:07 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 11:42 AM, Ranjan Maitra wrote:
I am on F31 and have always used sudo. This morning, after a while, I finally rebooted and am on the 5.5.8-200.fc31.x86_64 kernel. However, I appear to have lost my sudo access.
I get: that my username "is not in the sudoers file. This incident will be reported."
Not sure how this happened. How do I get back into sudoers? I am not even sure I, (in fact I think that I do not), have a root account.
It's unlikely that you were ever in the sudoers file unless you added it yourself. Normally the user is in the wheel group to make them admin and allowed to use sudo. What does the "id" command show for you?
I did not manually add the user but I have had sudo privileges because I checked the box with regard to administrator privileges while installing long long ago.
I had no idea that id was a command (thanks!) but here is what it says:
uid=1000(username) gid=1000(username) groups=1000(username),7(lp) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Somehow you got dropped from the wheel group. Did you uncheck your administrator access in the user control panel? In any case, if you don't have another admin user, you will need to use a live or rescue boot to add yourself back in to the wheel group.
No, I did not uncheck anything (because nothing every came up for me to uncheck). I can get into the rescue. What do I do after that?
Btw, you do have a root account, but it probably doesn't have a password. "sudo -i" will make you root.
I see, but it requires the wheel access that you were mentioning, I guess.
Thanks again, Ranjan
On 3/17/20 2:34 PM, Ranjan Maitra wrote:
On Tue, 17 Mar 2020 13:54:59 -0700 Samuel Sieb samuel@sieb.net wrote:
Somehow you got dropped from the wheel group. Did you uncheck your administrator access in the user control panel? In any case, if you don't have another admin user, you will need to use a live or rescue boot to add yourself back in to the wheel group.
No, I did not uncheck anything (because nothing every came up for me to uncheck). I can get into the rescue. What do I do after that?
Since I'm not sure which rescue setup you have, I'll give you the easier method. At the grub menu edit the boot entry and add "init=/bin/bash" to the end of the linux line. This will boot you right to a root bash prompt. Then run the following two commands, replace "username" with your real username: /usr/sbin/usermod -a -G wheel username /usr/sbin/reboot -f
Btw, you do have a root account, but it probably doesn't have a password. "sudo -i" will make you root.
I see, but it requires the wheel access that you were mentioning, I guess.
Yes. You mentioned that you didn't have a root account and I was clarifying that you do, it just can't be logged into directly.
Hi,
I did this.
On Tue, 17 Mar 2020 14:53:26 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 2:34 PM, Ranjan Maitra wrote:
On Tue, 17 Mar 2020 13:54:59 -0700 Samuel Sieb samuel@sieb.net wrote:
Somehow you got dropped from the wheel group. Did you uncheck your administrator access in the user control panel? In any case, if you don't have another admin user, you will need to use a live or rescue boot to add yourself back in to the wheel group.
No, I did not uncheck anything (because nothing every came up for me to uncheck). I can get into the rescue. What do I do after that?
Since I'm not sure which rescue setup you have, I'll give you the easier method. At the grub menu edit the boot entry and add "init=/bin/bash" to the end of the linux line. This will boot you right to a root bash prompt. Then run the following two commands, replace "username" with your real username: /usr/sbin/usermod -a -G wheel username
However, I get a bunch of selinux context stuff (in a line), at the end of which it says "res=failed". This laptop is one of those 4K resolution ones and so has very small print on the console and so I could not take a picture that is clear enough.
/usr/sbin/reboot -f
and it does not add wheel access.
Is it possible that I may have accidentally deleted a package which has this?
Ranjan
On Tue, 17 Mar 2020 17:11:46 -0500 Ranjan Maitra maitra@email.com wrote:
Hi,
I did this.
On Tue, 17 Mar 2020 14:53:26 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 2:34 PM, Ranjan Maitra wrote:
On Tue, 17 Mar 2020 13:54:59 -0700 Samuel Sieb samuel@sieb.net wrote:
Somehow you got dropped from the wheel group. Did you uncheck your administrator access in the user control panel? In any case, if you don't have another admin user, you will need to use a live or rescue boot to add yourself back in to the wheel group.
No, I did not uncheck anything (because nothing every came up for me to uncheck). I can get into the rescue. What do I do after that?
Since I'm not sure which rescue setup you have, I'll give you the easier method. At the grub menu edit the boot entry and add "init=/bin/bash" to the end of the linux line. This will boot you right to a root bash prompt. Then run the following two commands, replace "username" with your real username: /usr/sbin/usermod -a -G wheel username
However, I get a bunch of selinux context stuff (in a line), at the end of which it says "res=failed". This laptop is one of those 4K resolution ones and so has very small print on the console and so I could not take a picture that is clear enough.
Actually, I missed a line earlier. I get:
usermod: cannot lock /etc/passwd: try again later
and then gives this selinux stuff under audit:
/usr/sbin/reboot -f
and it does not add wheel access.
Is it possible that I may have accidentally deleted a package which has this?
Ranjan _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
-- Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.
On 3/17/20 3:19 PM, Ranjan Maitra wrote:
On Tue, 17 Mar 2020 17:11:46 -0500 Ranjan Maitra maitra@email.com wrote:
On Tue, 17 Mar 2020 14:53:26 -0700 Samuel Sieb samuel@sieb.net wrote:
Since I'm not sure which rescue setup you have, I'll give you the easier method. At the grub menu edit the boot entry and add "init=/bin/bash" to the end of the linux line. This will boot you right to a root bash prompt. Then run the following two commands, replace "username" with your real username: /usr/sbin/usermod -a -G wheel username
However, I get a bunch of selinux context stuff (in a line), at the end of which it says "res=failed". This laptop is one of those 4K resolution ones and so has very small print on the console and so I could not take a picture that is clear enough.
Actually, I missed a line earlier. I get:
usermod: cannot lock /etc/passwd: try again later
I see that one.
and then gives this selinux stuff under audit:
I don't see that. Where did you find that?
Anyway, what I missed is that / is still read-only at that point. So before the other commands I gave you, run: mount -o rw,remount /
Hi, your latest suggestion resulted in success at the terminal but I don't have network manager anymore or sudo access. So I have also lost access to the network. What should I try? Thanks again, Ranjan
On 3/17/20 6:04 PM, Ranjan Maitra wrote:
Hi, your latest suggestion resulted in success at the terminal but I don't have network manager anymore or sudo access. So I have also lost access to the network. What should I try? Thanks again, Ranjan
You still don't have sudo access? What does the "id" command show now? It sounds like something went wrong with your update, but you won't be able to do anything until you have sudo access again.
My apologies, but I still don't have sudo access and I have now lost network manager.
id says exactly the same thing as before except that there is no "7(lp)" before the context field.
My apologies again for any inclarity but because I am not on the network I cannot cut and paste and have to type on my phone to write this email. Thanks.
Mar 17, 2020 8:10:05 PM Samuel Sieb samuel@sieb.net:
On 3/17/20 6:04 PM, Ranjan Maitra wrote:
Hi, your latest suggestion resulted in success at the terminal but I don't have network manager anymore or sudo access. So I have also lost access to the network. What should I try? Thanks again, Ranjan
You still don't have sudo access? What does the "id" command show now? It sounds like something went wrong with your update, but you won't be able to do anything until you have sudo access again. _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
On 3/17/20 6:16 PM, Ranjan Maitra wrote:
My apologies, but I still don't have sudo access and I have now lost network manager.
id says exactly the same thing as before except that there is no "7(lp)" before the context field.
Did the usermod command not work? If you boot with the init=/bin/bash option again, do: mount -o rw,remount / vi /etc/group /usr/sbin/reboot -f
In vi, go down to the wheel line and add your username to the end if it's not already there.
Hi, thanks. The wheel line reads:
wheel:x:10:username
So I guess it is there. However, I neither have sudo access or network manager.
Also, when I say
reboot,
I get:
Failed to connect to bus: Connection refused
Does this shed any light. Thanks!
Mar 17, 2020 10:11:16 PM Samuel Sieb samuel@sieb.net:
On 3/17/20 6:16 PM, Ranjan Maitra wrote:
My apologies, but I still don't have sudo access and I have now lost network manager.
id says exactly the same thing as before except that there is no "7(lp)" before the context field.
Did the usermod command not work? If you boot with the init=/bin/bash option again, do: mount -o rw,remount / vi /etc/group /usr/sbin/reboot -f
In vi, go down to the wheel line and add your username to the end if it's not already there. _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
On 3/17/20 8:18 PM, Ranjan Maitra wrote:
Hi, thanks. The wheel line reads:
wheel:x:10:username
So I guess it is there. However, I neither have sudo access or network manager.
Also, when I say
reboot,
That wasn't the command I gave you. It was: /usr/sbin/reboot -f
But since you mentioned selinux errors, while in the root shell, run: mount -o rw,remount / touch /.autorelabel /usr/sbin/reboot -f
When it reboots, it will do a full relabel of the filesystem. See if that helps at all.
Thanks, the selinux relabeling appears to have been it. Everything including NetworkManager is back on track again!
Thank you very much for your patient efforts!!
Best wishes, Ranjan
On Tue, 17 Mar 2020 20:35:49 -0700 Samuel Sieb samuel@sieb.net wrote:
On 3/17/20 8:18 PM, Ranjan Maitra wrote:
Hi, thanks. The wheel line reads:
wheel:x:10:username
So I guess it is there. However, I neither have sudo access or network manager.
Also, when I say
reboot,
That wasn't the command I gave you. It was: /usr/sbin/reboot -f
But since you mentioned selinux errors, while in the root shell, run: mount -o rw,remount / touch /.autorelabel /usr/sbin/reboot -f
When it reboots, it will do a full relabel of the filesystem. See if that helps at all. _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
-- Important Notice: This mailbox is ignored: e-mails are set to be deleted on receipt. Please respond to the mailing list if appropriate. For those needing to send personal or professional e-mail, please use appropriate addresses.