FreeBSD-এ doas ইনস্টল করুন
হ্যালো, আমি অযোগ্য।
FreeBSD-এ sudo ব্যবহার করা ঠিক আছে, কিন্তু কমান্ডের কাজ করার সময়, উদাহরণস্বরূপ, যদি আপনি টার্মিনালে পাশের ট্যাবে GNU/Linux পরিবেশে কাজ করেন এবং FreeBSD-ও একই sudo কমান্ড দিয়ে চালানো যায়, তাহলে অনিচ্ছাকৃত অপারেশন হওয়ার সম্ভাবনা থাকে। তাই, sudo-এর মাধ্যমে অ্যাডমিনিস্ট্রেটর প্রিভিলেজ চালানো অক্ষম করে doas ব্যবহার করা নিরাপদ বলে মনে হয়, তাই আমি doas ব্যবহার করব।
এটি FreeBSD ফোরামেও আলোচিত হচ্ছে বলে মনে হচ্ছে।
pkg দিয়ে ইনস্টল করুন
এই Qiita নিবন্ধে জাপানি ভাষায় খুব বিস্তারিত ব্যাখ্যা দেওয়া হয়েছে।
# pkg install doas
Updating FreeBSD repository catalogue...
Fetching data.pkg: 100% 7 MiB 7.5MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 35521 packages processed.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
doas: 6.3p12
Number of packages to be installed: 1
24 KiB to be downloaded.
Proceed with this action? [y/N]: y
[1/1] Fetching doas-6.3p12.pkg: 100% 24 KiB 24.6kB/s 00:01
Checking integrity... done (0 conflicting)
[1/1] Installing doas-6.3p12...
[1/1] Extracting doas-6.3p12: 100%
=====
Message from doas-6.3p12:
--
To use doas,
/usr/local/etc/doas.conf
must be created. Refer to doas.conf(5) for further details and/or follow
/usr/local/etc/doas.conf.sample as an example.
Note: In order to be able to run most desktop (GUI) applications, the user
needs to have the keepenv keyword specified. If keepenv is not specified then
key elements, like the user's $HOME variable, will be reset and cause the GUI
application to crash.
Users who only need to run command line applications can usually get away
without keepenv.
When in doubt, try to avoid using keepenv as it is less secure to have
environment variables passed to privileged users.
এবং তারপর, /usr/local/etc/doas.conf ফাইলটি এডিট করুন এবং নিম্নলিখিতভাবে লিখুন।
permit keepenv username
চালান
এখন, নির্দিষ্ট ব্যবহারকারীতে স্যুইচ করুন এবং doas command চালানোর চেষ্টা করুন।
$ su - username
$ doas vim /usr/local/etc/doas.conf
Password:
এতে, আমি পাসওয়ার্ড প্রবেশ করে সফলভাবে এটি চালাতে পেরেছি।