How do I setup a user for sudo?
In Debian, I install sudo from the repositories and add the user to the sudo group... DONE.
Before I begin. I am going to admit that I have ignored the FreeNAS jail documents stating that if I want the new user to have superuser privileges put them in the wheel group. I did this because I am thinking... I don't want the user to be a superuser and if i needed to execute a commend with elevated rights I would use "sudo". (example:
So what I have done so far:
Created the jail
Access jail
Ran updates -
Enabled ssh
SSH into the new jail with the new user = Good
Then I tried to sudo and it looked like it was not installed. So I installed "sudo" with
I added the following to the bottom file after opening it with visudo:
This appears to have worked but I did not like how it does not prompt for the user's password.
I tried
and a few other things that I can't remember.
I got the following message after the password prompt ever time:
If I change it back to the "NOPASSWD: ALL" it again appears to work but without a password prompt
So what is what I done trying to get "sudo" to work while avoiding putting the user account in the "wheel" group.
Thanks.
In Debian, I install sudo from the repositories and add the user to the sudo group... DONE.
Before I begin. I am going to admit that I have ignored the FreeNAS jail documents stating that if I want the new user to have superuser privileges put them in the wheel group. I did this because I am thinking... I don't want the user to be a superuser and if i needed to execute a commend with elevated rights I would use "sudo". (example:
sudo pkg update
)So what I have done so far:
Created the jail
Access jail
Ran updates -
pkg update
, pkg update
Enabled ssh
- made backup of the rc.conf file
- Edited the rc.conf file
- Code:
sshd_enable=“YES”
- started ssh
service sshd start
adduser
SSH into the new jail with the new user = Good
Then I tried to sudo and it looked like it was not installed. So I installed "sudo" with
pkg install sudo
. I tried to add the user to the "sudo" group pw group mod sudo -m the-username
but it looks like there is no group called "sudo". I then opted for editing the sudoers file.I added the following to the bottom file after opening it with visudo:
Code:
raksasas ALL=(ALL) NOPASSWD: ALL Defaults: user timestamp_timeout=-1
This appears to have worked but I did not like how it does not prompt for the user's password.
I tried
Code:
test1 ALL=(ALL) PASSWD: ALL
Code:
test1 ALL=(ALL) ALL
and a few other things that I can't remember.
I got the following message after the password prompt ever time:
/usr/local/bin/sudo: Undefined symbol "memset_s"
If I change it back to the "NOPASSWD: ALL" it again appears to work but without a password prompt
So what is what I done trying to get "sudo" to work while avoiding putting the user account in the "wheel" group.
Thanks.
Last edited by a moderator: