B
BSDAppentic3
Guest
I'm trying to install a desktop environment in one account that isn't root. But I can't. It says that the user doesn't appear in the "sudoers" file. Give me a moment and I'll give you the specific output.
% su root -c 'pkg ins package'
% su root -c visudo
, then uncomment
%wheel ALL=(ALL) ALL
% su root -c 'pw groupmod wheel -m [I]yourusername[/I]'
and relogin.Ifsecurity/sudo should solve the original posters question.
then he already got security/sudo installed.It says that the user doesn't appear in the "sudoers"
% sudo [I]something[/I]
. -G
with a small -g
) ee /usr/etc/sudoers
root ALL=(ALL) ALL
and add in the newline these thing:(your user name) ALL=(ALL) ALL
then save, relogin to your account and issue sudo(8) you should see the famous message.Never edit this file directly, use visudo(8) to edit it.Issue the command as root:
ee /usr/etc/sudoers
su
to issue commands as root? su
. I know I'm root and what I'm doing as root. When I'm done I log out to my user account.What is the advantage of using anything but su to issue commands as root?
% history
(fc -l 1 in zsh). dd
. As a user, you can look at the files on a mounted USB stick, and use graphics/gimp to access an image, but not make file changes or transfers.Hum... personally I set sudo to ask for root password... and I never communicate the root password
I know this is the default behaviour of sudo, but I find that a little strange and very useless to ask for a password the user in any case knows (his own password)... to grant him root's rights
But the situation of Trihexgonal is a special case, not a general case.
For most of us , a standalone windows manager IS ABSOLUTELY NOT A DESKTOP
A real desktop is an environement bringing a mininum of comfort and functionnalities as Gnome, KDE.... In such context, sudo is generally a required package.
Thanks for the correct path. Uhm, since I don't know how to use vi, even when reading its manpage while editing I still can't. I have no way other than using ee.Never edit this file directly, use visudo(8) to edit it.
(And it's the wrong file, it's /usr/local/etc/sudoers on FreeBSD)
visudo(8) respects theUhm, since I don't know how to use vi, even when reading its manpage while editing I still can't. I have no way other than using ee.
EDITOR
environment variable.BTW, It respects it only if you logged in as root, but if you try to runvisudo(8) respects theEDITOR
environment variable.
% sudo visudo
, % sudo -E visudo
should be used, then visudo will use your $EDITOR.BTW, It respects it only if you logged in as root, but if you try to run% sudo visudo
,
sudo will ignore it, to make visudo respect $EDITOR when using sudo, one should use -E flag with sudo,
so% sudo -E visudo
should be used, then visudo will use your $EDITOR.
keepenv
It won't help with sudo, it'll work only when you'll use su,or set the $EDITOR variable either in /etc/csh.cshrc, or in /root/tcshrc if root's shell is default tcsh,
or in /etc/profile if root's shell has been set to a Bourne-compliant one
Defaults env_keep += "EDITOR"
You almost never need to reinstall the system unless you do something really nasty with Kernel or Base, like recursively changing permissions or owner/groups of files in there.
For anything else done in /usr/local stuff (aka from packages and/or ports) you can always easily RESET the things if you need to go so far.
Just take care to backup any configuration file you want from /usr/local/etc first.
If the problem is related with configuration files from Base, mergemaster(8) can be used to reset them.