last day (15 days later) » 

17:19
@NgocThangPham please join me here.
Hi
So. You are working on a rasperryPi right?
yes. I have one, today I installed pinet to make an image OS for Raspi
OK, but the sudo issue is on the Pi, correct?
No. It's on my computer
17:25
Then why are you mentioning the Pi?
Is this happening on a live system or have you installed Ubuntu on your computer?
because I it happened after I install pinet
I installed Ubuntu
OK. So on your computer, not the Pi, you have i) installed Ubuntu normally and ii) installed PiNet. Correct?
OK. Now, open a terminal window (Ctrl+Alt+T) and run these commands: i) whoami ii) sudo whoami iii) sudo -k and iv) sudo whoami again.
Here, you can copy/paste this directly into the terminal:
whoami
sudo whoami
sudo -k
sudo whoami
Then copy the output and paste it here.
thang@thang-HP-ProBook-450-G1:~$ whoami
thang
thang@thang-HP-ProBook-450-G1:~$ sudo whoami
root
thang@thang-HP-ProBook-450-G1:~$ sudo -k
thang@thang-HP-ProBook-450-G1:~$ sudo whoami
root
17:29
Damn!
Hmm, what's the output of grep thang /etc/password?
Sorry, I meant this:
grep thang /etc/passwd
thang@thang-HP-ProBook-450-G1:~$ grep thang /etc/passwd
thang:x:1000:1000:thang,,,:/home/thang:/bin/bash
OK, so no, your user is not root. What is the output of groups?
I think that everything works fine :|
Yes, but it's very strange that you're not being asked for a password. Something weird is going on.
What is the output of groups ?
Sorry, how can i check my group?
thang@thang-HP-ProBook-450-G1:~$ groups thang
thang : thang adm dialout cdrom sudo audio dip video plugdev games users input lpadmin sambashare pupil teacher
Is it?
17:33
Yes
I guess the pupil and teacher groups were added by PiNet.
This is very strange. I am editing your question to clarify it and to add the information you gave here. Sorry, but I have no idea how this could be happening.
OK. Thanks for your help.
And should i clear group teacher and pupil ?
@NgocThangPham I don't see how that would be relevant.
Hang on, are there any files in /etc/sudoers.d ?
What's the output of ls /etc/sudoers.d?
@NgocThangPham?
01staff and README
oh
%teacher ALL=NOPASSWD: ALL
in 01staff
17:42
AAAAAAAAAA
There we go!
OK, let's add that to your question, and I can post an answer.
OK. I will delete that file?
Either delete it or remove yourself from the teacher group. I don't think PiNet is what you wanted by the way, that's designed for classrooms.
oh ok
Thank you so much. :))
You're welcome. That was a confusing problem :)
Please remeber to accept my answer so the question can be marked as solved.

last day (15 days later) »