You are not logged in.
intention (goal) :
Trying to create a shared directory but with the constraint of not using the most accessible help in my system (internet search!!) . And if you have installed the most popular distros that is Firefox / google (by default). (so no web-search, no irc , no im , no forums, no emailists ... funny how most help systems need the net!) .. so that leaves us with 'good??' old manpages and possibly info.
User profiles:I approach the task from the perspective of either a sysadm that forgets always the details of a task or a naive user that is not afraid of tty.
Possible steps:
First: How do i search for related commands ? But that could be a wrong approach. Maybe our intention can be accomplished with a bunch of various commands.
So initially we could need help both in how we use the help inside our offline system and what commands could help me.
Possitble steps / search for commands / help
Know how to search for commands related to your intention. So if we dont remember how to ask our system for help we could go:
$ help
....These shell commands are defined internally. ...
cd [-L|[-P [-e]] [-@]] [dir] // interestingly there is no #man cd
// or #man alias but there is #man pwd
$ help share files
bash: help: no help topics match `sharing'. Try `help help' or `man -k sharing' or `info sharing'.
//cool.help states that as far it knows 'man' and 'info' are the help systems to look at !Possitble steps / search for commands / man
So my system dont seem it can help me unless i know $ man
But that still would help us! We need also $ man man
Indeed $ man man is a good start . (as @blackhole reminded me)
It explains that the system docs it can access and present to us are organized in sections and pages . And a page is structured in sections.
Also its opens the road to $ man -a intro and $ man -k and it refers also to apropos.
Possitble steps / search for commands / man -k (apropos)
But i think even that wont help us. For sharing a folder we must know about groups. That is a basic knowledge for even a forgetfull sysadm. (we already assume that the system has more than one users!!). Interestingly arpinux's debian begginer's handbook (see further in that forum's thread for more related details) refers to Linux's mutliuser nature in the Rights and permissions sections. So the naive but determined tty-fearless user could learn that permissions on a folder could be the answer to sharing.
Possitble steps / search for commands / searching for groups
1. Search for group related commands (# apropos group)
$ apropos group | wc
122 1077 7284
$ apropos groups | wc
23 214 1425Lets narrow a list of commands that seem related: addgroup(8) , adduser(8) , getgroups(2)!! (how could a user know what '2' means?) , groups(1), setgroups(2)
Having already learned about man section we can narrow our list to sections 1 (Executable programs or shell commands),5(File formats and conventions),7(misc), 8 (System administration commands (usually only for root)).
$ apropos -s 1,5,7,8 groups | wc
17 157 1037 Interstingly (for me!) root will give us the same :
# apropos -s 1,5,7,8 groups | wc
17 157 1037Still 17 commands are a lot. In worst case the forgetfull admin should read all the man pages ! (i wonder if i could pipe apropos results to man or another pager...)
But looking apropos's results shorts descriptions i guess we should start from groups(1) print the groups a user is in and addgroup (8) - add or manipulate users or groups.
(here we miss groupmod .. not because apropos wont find it but because
# apropos -s 1,5,7,8 group | wc
57 534 3614. So we should search among more commands.
So now a plan can be formulated:
create a folder # mkdir /home/sharedfolder
create a group (family)
change shared's folder group owner
add your users in that group
do some testing to see if the default permissions suits you.
Ok. Lets create the shared folder. If we choose /home as our parent dir then only root can create it. Also only root can call addgroup.
And only the root must change the folder's group.
$ man addgroup
Add a group
If adduser is called with the --group option and without the --system option, or addgroup is called respectively, a
user group will be added.# addgroup family
bash: addgroup: command not foundAt that point i think our naive user will stop. (no internet)
A debian quirk makes even for root addgroup not accessible.
# sudo apt-file search addgroup
adduser: /usr/sbin/addgroup So try again:
# /usr/sbin/addgroup familyNow it'd be handy to validate that our group was created. But how ? The command we have found so far wont help us. So lets believe that if linux wont say anything is a good sing .(see unix philosophy @.)
Now how do we change the group owner of our /home/sharedfolder ?
# apropos permissions
...
access (2) - check user's permissions for a file
chmod (2) - change permissions of a file
...Here again the previous apropos command bites us. We need chown . So again we'r stuck. man pages are indifferent to our intentions or for what purpose we want to use a commands.
In worst case we must backtrack and look at # apropos -s 1,5,7,8 group having more faith at the short descriptions.
So we backtrack. (no internet ).
# man chown // good description guides us here well.
# ls -al
...
drwxrwxr-x 2 root root 4096 Jun 24 10:33 sharedFolder
...
# chown root:family sharedFolder
# ls -al
...
drwxrwxr-x 2 root family 4096 Jun 24 10:33 sharedFolder
.../usr/sbin/groupmod -a -U alex,olga family
Last edited by chomwitt (Today 18:38:06)
Online
The first step is:
% man manLast edited by blackhole (Today 08:49:18)
Offline
@blackhole thanks . noted . But what if my forgetfull - naive sysadm (or daring user)dont remeber that ?
So a forgetfull sysadm should first (as you propose) remember how to use the help system.
That seem correct. But how could (s)he remember that $ man man works ?
I think most propably s(he) would try $ help $ get-help ( :-) )
Last edited by chomwitt (Today 08:58:04)
Online
What I miss in the man pages are examples for at least standard applications. manpages usually just list the options.
Offline
@rolfie At least in my stated goal man pages dont seems to help. Although the task could seem rather trivial (create a shared dir) . Debian has online a basic user guide @ (They now offer it also in a deb package (debian-beginners-handbook-en_13.3_all.deb) .But i dont think is in the repos yet. I think it'd be a good idea install images to have such a package.
Maybe the Devuan user installation guide @ could also be included in such a package.
Last edited by chomwitt (Today 14:52:09)
Online
mostly out of curiosity as to the quality and format of offline materials...
went to link @chomwitt provided:
https://debian-beginners-handbook.arpinux.org/index-en.html
and then further:
https://debian-beginners-handbook.arpinux.org/trixie-en/index.html
and downloaded the 17MB 267page pdf(warning: direct link to pdf download)
*ttps://debian-beginners-handbook.arpinux.org/trixie-en/download/the_beginners_handbook.pdf
fun read so far.
ymmv.
Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!
Offline
As for the .deb packaged guide. I downloaded and installed it.
$ sudo dpkg -i debian-beginners-handbook-en_13.3_all.deb
$ dpkg -L debian-beginners-handbook-en
/.
/usr
/usr/bin
/usr/bin/debian-beginners-handbook-en
/usr/share
/usr/share/applications
/usr/share/applications/debian-beginners-handbook-en.desktop
/usr/share/debian-beginners-handbook-en
/usr/share/debian-beginners-handbook-en/the_beginners_handbook.pdf
/usr/share/doc
/usr/share/doc/debian-beginners-handbook-en
/usr/share/doc/debian-beginners-handbook-en/README.Debian
/usr/share/doc/debian-beginners-handbook-en/changelog.gz
/usr/share/doc/debian-beginners-handbook-en/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/debian-beginners-handbook-en.1.gz
/usr/share/pixmaps
/usr/share/pixmaps/debian-beginners-handbook-en.pngIt basically a pdf. It has a nice touch though. It installs a script command that open the pdf:
#!/bin/sh
xdg-open /usr/share/debian-beginners-handbook-en/the_beginners_handbook.pdf &
exit 0Also as for the guide's history i found here the older versions @ and a 2017 version on the internet archives @
As for the authors he has the nick arpinux .(website: @) and the guide is released under the WTFPL @
Last edited by chomwitt (Today 17:25:49)
Online