Désolé

Solved
master_pc Posted messages 338 Status Member -  
master_pc Posted messages 338 Status Member -
Hello,

I installed FreeBSD on my PC and when I am logged in with my account and I want to execute an important command that requires the "su" command, it replies "sorry". Why?

Thank you.

Emilien.

Configuration: Windows 7 / Firefox 9.0

7 answers

mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
 
First possibility, you might be mistyping the password. Check the usual things (azerty/qwerty, lowercase/uppercase, num lock...).

Second possibility, it seems to me that Gentoo is inspired by FreeBSD and under Gentoo, to be able to use 'su', you need to be in the wheel group (see /etc/group). You can add your user via the addgroup command.

addgroup toto wheel


http://www.mistra.fr/tutoriel-linux-profils-et-droits.html#h3-2-1-groupe-local

Good luck!
1
master_pc Posted messages 338 Status Member 8
 
Hello,

Thank you very much for the reply, but he doesn’t even know the addgroup command! I don’t understand much, but commands like groups or id work!

Emilien.
0
synopsis8 Posted messages 1478 Status Member 243
 
You need to edit the /etc/group file with the root account; there is a user group "wheel" which is the default group that has the right to switch to root using the "su" command. You should add your userID as a member, that will be a start.

Then, if you also want to use the "sudo" command, you will need to install it, as far as I remember, it is not included by default on FreeBSD.

Optionally, you can add this to your /usr/local/etc/sudoers

%wheel ALL=(ALL) NOPASSWD: ALL

Old Core 2 Duo clocked at 3GHZ with 6 GB of RAM.
0
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
 
A little clarification, you don't have to install and configure sudo. Personally, I use it rarely.

You need to switch to text mode (ctrl alt f1) and log in directly as root. We will modify the configuration file /etc/group (which describes the members of each group) with a text editor, for example nano, vi, or emacs. Let's take nano as an example:
http://www.mistra.fr/tutoriel-linux-nano.html

Run the following command in your root session:

nano /etc/group


Go to the line beginning with wheel. Add your user login (for example toto) at the end of the line. If you want to add multiple logins, separate them with a comma. Save and exit (ctrl x) and confirm. This is equivalent to the addgroup command.

You may need a reboot for the changes to take effect (or the sg command?). Then you should be able to switch to root in a user session with the command:

su -


Good luck!
0
master_pc Posted messages 338 Status Member 8
 
Hello,

Thank you very much for all these answers, I think at least one will suit me, thanks again!

Emilien.
0
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
 
Hi Émilien,

Okay, I'm marking the topic as resolved, but feel free to reopen it if the need arises. In that case, please forward me the error messages so I can understand what went wrong ;-)

Have a good day
0
master_pc Posted messages 338 Status Member 8
 
Thank you very much for the support! I won't hesitate.
0