You are not logged in.

#26 2018-01-05 22:43:50

loqs
Member
Registered: 2014-03-06
Posts: 17,417

Re: [SOLVED] permission of /home reset after reboot

$ sudo mkdir test
$ sudo chmod 751 test
$ sudo mkdir test/a
$ ls -la test
ls: cannot open directory 'test': Permission denied
$ ls -lad test/a
drwxr-xr-x 2 root root 40 Jan  5 22:30 test/a
$ ls -lad /home/testuser/
drwx------ 20 testuser testuser 4096 Dec 21 21:38 /home/testuser/
$ getent passwd testuser 
testuser:x:1001:1001::/home/testuser:/bin/bash

So you can get the usernames anyway from /etc/passwd or various commands e.g. getent and even if you had a directory or file which is not a username a local process could still brute force guess it given enough time.
However home directories are not readable apart from by that user or that users primary group or root as root ignores permissions so it would appear to me to offer very little obfuscation.  You could also drop
the execute bit from others that would prevent guessing an entry but would not protect user names / UID's.

Please also consider Code_of_conduct#Life_is_a_two-way_street and Code_of_conduct#Spam.2FAdvertising.2FSolicitation sharing the issue on the forum benefits everyone who can read it asking the issue here just to request it be taken off the forum even though good intentioned only benefits yourself.
edit:
erroneous line break

Last edited by loqs (2018-01-05 22:45:01)

Offline

Board footer

Powered by FluxBB