Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
I installed Doas as a replacement for sudo on my Gentoo machine. I followed the documentation here and my /etc/doas.conf looks like this:
permit persist :wheel
I have also restarted the system. However, it still asks me for the password every time I use doas. What am I doing wrong?
You have to enable persist while you are compiling. Set persist use flag and it will work. If you have (persist) while you are compiling, you have to unmask the app-admin/doas first.
Make below changes in the doas configuration.
permit nopass ::wheel
or
allow user and dont require a password to execute commands as root
permit nopass keepenv :username2
Reference URL
https://forums.freebsd.org/threads/doas-tips-sudo-alternative.69409/
This works for me:
permit persist username as root
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
Does sudoers file required to restart to take changes effect. If yes, then how we can restart? without resarting the system.
If your question is : "do I need to restart my machine if I add someone in the sudoers file ?" the answer is : No, you don't need to restart, the newly user added in the sudoers will be able to use sudo as soon as you save the file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I have a Ubuntu 12.04 machine that I can only access using SSH. On this machine I have two users and I want to limit the access to certain files to one of these users.
Basically I want that user to be able to access only its home directory and nothing more. I know that by removing the rx permissions to other home directories for others is one option but I wanted to know if there is another way, a configuration file where I can tell that my user can only have access to that folder.
Thanks.
chrooted jail is the answer.
Like: https://www.howtoforge.com/chrooted-ssh-sftp-tutorial-debian-lenny
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I am using Linux system but by mistake I fired a chmod command as follows:-
chmod -R 777 /
after that I restart my System. But when I try to login, the system is login but after 2-3 seconds again to login window. Please help me to solve this problem.
Just get your important files and configs backup them. format the partition which the OS installed, then reinstall again, sorry there is no easy way to correct these permissions.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I logged into my account on Bluehost using SSH and I got an unusual prompt.
I expected it to show the directory and a typical prompt but instead got some bash.
What you're seeing is the default bash prompt. This is what you get when the distro doesn't provide a better one in /etc/profile or similar. You can get it on any platform by ignoring the environment and config files:
env -i bash --norc
To get the user#host:dir$ prompt that Debian and derived distros use, you can add
export PS1='\u#\h:\w\$ '
to your .bash_profile
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I need to control the transferring of files on my server. Some files are sent through scp to my server and I want such a files to have a specific set of permissions let's say 770. I tried pam_umask.so in /etc/pam.d/login and setting umask in /etc/profile but it seems to not work.
Which is the best way on Linux to force an umask for files transferred via scp?
Regards,
Andrea
AFAIK, scp does not initialize a shell, thus don't source any file such as .profile, .bashrc, /etc/profile.
So the only way of doing this, as commented by Stefan Ferstl, seems to use the pam module pam_umask.so.
The file /etc/pam.d/sshd is probably the best place to do it, if you want to limit this behavior to ssh sessions :
session optional pam_umask.so umask=0007