En la mayoría de distribuciones GNU/Linux basta teclear el
comando su o sudo para que se nos pida la contraseña de root y obtengamos de
inmediato su prompt y los permisos correspondientes.
En FreeBSD, sin embargo, veremos que ni uno ni otro sistema
funcionan... al menos hasta que no decidamos hacer algo al respecto...
Por defecto, FreeBSD sólo permite acceso root a usuarios
incluidos en el grupowheel, un grupo reservado para tareas de administración al
que inicialmente sólo pertenece el propio root. Por tanto, si queremos que
nuestro usuario "oscar" pueda tener permisos de superusuario, una de
las maneras mas r[apidas y efectivas que eh visto es: "loguearnos"
como root y agregar "oscar" al grupo wheel.
En primer lugar comprobamos si ya está incluido:
# pw showgroup wheel
wheel:*:root
En caso que NO se encuentre. Digite el comando a continuación para añadirlo:
# pw user
mod oscar -G wheel
Comprobamos de nuevo si "oscar" está en el grupo
wheel:
# pw
showgroup wheel
wheel:*:root,oscar
Ahora sí; ya podemos usar nuestra cuenta "oscar" y
con un simple su (+ contraseña) obtener privilegios de root cuando los
necesitemos. Al finalizar las operaciones debemos abandonar la cuenta root
tecleando exit (o Ctrl-D).
EL GRUPO WHEEL
No me resisto a comentar la curiosa explicación que subyace
a la existencia del grupo wheel en BSD y otros Unix, mientras que en muchos
GNU/Linux ese grupo no está activo o simplemente no existe.
La clave parece estar en un párrafo de Richard Stallman, que
reproduzco a continuación:
Why GNU
`su' does not support the `wheel' group
===============================================
(This
section is by Richard Stallman.)
Sometimes a
few of the users try to hold total power over all the rest. For example, in
1984, a few users at the MIT AI lab decided to seize power by changing the
operator password on the Twenex system and keeping it secret from everyone
else. (I was able to thwart this coup and give power back to the users by
patching the kernel, but I wouldn't know how to do that in Unix.)
However,
occasionally the rulers do tell someone. Under the usual `su' mechanism, once
someone learns the root password who sympathizes with the ordinary users, he or
she can tell the rest. The "wheel group" feature would make this
impossible, and thus cement the power of the rulers.
I'm on the
side of the masses, not that of the rulers. If you are used to supporting the
bosses and sysadmins in whatever they do, you might find this idea strange at
first.
Así que ya sabéis: el grupo "wheel" cimenta el
poder de los que mandan. Stallman dixit
Comentarios
Publicar un comentario