manythanks bruno
interesting, so reading
11.4.1 Adjusting the default umask I have to
“For individual users, add the umask to the ‘gecos’ field in /etc/passwd like this:”
tux:x:1000:100:Tux Linux,UMASK=022:/home/tux:/bin/bash
/etc/passwd file seems dangerous, is it safe to edit and add what suggested??
then I did a test:
reassumed at the end with comments, and about you what I have to do to have in
laptop3 leap upgraded 15.6 to 16.0
an umask 002? needed to create user and group files
another intersting point you posted
11.6 World-writable files
where I cannot understand how to have automatically in the usb disks
=============
laptop4 leap 15.6 user=pla
pla@plaTW:~> ll /media/
total 12
drwxrwxrwx 13 root root 12288 Mar 6 10:00 backup5
pla@plaTW:~>
pla@plaTW:~> umask
0002
pla@plaTW:~>
pla@plaTW:~> cd /media/backup5/
pla@plaTW:/media/backup5> touch test-lap4-15.6-pla.txt
pla@plaTW:/media/backup5> ll | grep -i test
-rw-rw-r-- 1 pla users 0 Mar 6 10:10 test-lap4-15.6-pla.txt
pla@plaTW:/media/backup5>
pla@plaTW:/media/backup5> cat /etc/profile | grep -i umask
# The global umask value is stored in /etc/login.defs and
# will be set by pam_umask.so (see "man pam_umask").
#umask 022
pla@plaTW:/media/backup5>
pla@plaTW:/media/backup5> cat /etc/profile.local | grep -i umask
cat: /etc/profile.local: No such file or directory
pla@plaTW:/media/backup5>
pla@plaTW:/media/backup5> cat /usr/etc/profile.local | grep -i umask
cat: /usr/etc/profile.local: No such file or directory
pla@plaTW:/media/backup5>
pla@plaTW:/media/backup5> cat /usr/etc/profile | grep -i umask
cat: /usr/etc/profile: No such file or directory
pla@plaTW:/media/backup5>
pla@plaTW:~> cat /home/pla/.profile | grep -i umask
pla@plaTW:~>
pla@plaTW:~> cat /etc/login.defs | grep -i umask
# Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems.
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new
UMASK 002
# If HOME_MODE is not set, the value of UMASK is used to create the mode.
# Enable setting of the umask group bits to be the same as owner bits
pla@plaTW:~>
pla@plaTW:~> cat /etc/login.defs.d/70-yast.defs | grep -i umask
UMASK 022
pla@plaTW:~>
pla@plaTW:~> cat /etc/pam.d/login | grep -i umask
pla@plaTW:~>
pla@plaTW:~> cat /usr/etc/login.defs | grep -i umask
cat: /usr/etc/login.defs: No such file or directory
pla@plaTW:~>
=================
laptop3 leap upgraded 15.6 to 16.0 user=pla
pla@localhost:~> ll /media/
total 272
drwxrwxrwx 13 root root 12288 mar 6 17:29 backup5
drwxrwxrwx 10 pla users 4096 mar 5 09:31 backup6
drwxr-xr-x. 54 camera users 262144 mar 3 16:32 cassapanca>>>>>>>>>>>this is exfat fs
pla@localhost:~>
pla@localhost:~> umask
0022>>>>>>>>>>>>>>>>>>>>>>why 0022 and not 0002??
pla@localhost:~>
pla@localhost:~> cd /media/backup5/
pla@localhost:/media/backup5> touch test-lap3-16.0u-pla.txt
pla@localhost:/media/backup5> ll | grep -i test
-rw-r--r--. 1 pla users 0 mar 6 17:33 test-lap3-16.0u-pla.txt>>>>>>>>>>>why rw-r and why the dot?
-rw-rw-r-- 1 pla users 0 mar 6 10:10 test-lap4-15.6-pla.txt
pla@localhost:/media/backup5>
pla@localhost:/media/backup5> cat /etc/profile | grep -i umask
# The global umask value is stored in /etc/login.defs and
# will be set by pam_umask.so (see "man pam_umask").
umask 002
pla@localhost:/media/backup5>
pla@localhost:/media/backup5> cat /etc/profile.local | grep -i umask
# The global umask value is stored in /etc/login.defs and
# will be set by pam_umask.so (see "man pam_umask").
umask 002
pla@localhost:/media/backup5>
pla@localhost:~> cat /usr/etc/profile.local | grep -i umask
cat: /usr/etc/profile.local: No such file or directory
pla@localhost:~>
pla@localhost:~> cat /usr/etc/profile | grep -i umask
pla@localhost:~>
pla@localhost:/media/backup5> cat /home/pla/.profile | grep -i umask
umask 002
pla@localhost:/media/backup5>
pla@localhost:/media/backup5> cat /etc/login.defs | grep -i umask
cat: /etc/login.defs: No such file or directory
pla@localhost:/media/backup5>
pla@localhost:/media/backup5> cat /etc/login.defs.d/70-yast.defs | grep -i umask
UMASK 022
pla@localhost:/media/backup5>
pla@localhost:/media/backup5> cat /etc/pam.d/login | grep -i umask
session optional pam_umask.so umask=0002
pla@localhost:/media/backup5>
pla@localhost:~> cat /usr/etc/login.defs | grep -i umask
# Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems.
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new
UMASK 002
# If HOME_MODE is not set, the value of UMASK is used to create the mode.
# Enable setting of the umask group bits to be the same as owner bits
pla@localhost:~>
=================
laptop2 leap 16.0 fresh installed user=eros
eros@localhost:~> ll /media/
total 12
drwxrwxrwx 13 root root 12288 6 mar 17.52 backup5
eros@localhost:~>
eros@localhost:~> umask
0002
eros@localhost:~>
eros@localhost:~> cd /media/backup5/
eros@localhost:/media/backup5> touch test-lap2-16.0i-eros.txt
eros@localhost:/media/backup5> ll | grep -i test
-rw-rw-r-- 1 eros users 1092 6 mar 18.56 etc profile test table.txt
-rw-rw-r-- 1 eros users 0 6 mar 19.03 test-lap2-16.0i-eros.txt
-rw-r--r--. 1 eros users 0 6 mar 17.41 test-lap3-16.0u-pla.txt
-rw-rw-r-- 1 eros users 0 6 mar 10.10 test-lap4-15.6-pla.txt
eros@localhost:/media/backup5>
eros@localhost:/media/backup5> cat /etc/profile | grep -i umask
# The global umask value is stored in /etc/login.defs and
# will be set by pam_umask.so (see "man pam_umask").
#umask 022
eros@localhost:/media/backup5>
eros@localhost:/media/backup5> cat /etc/profile.local | grep -i umask
cat: /etc/profile.local: No such file or directory
eros@localhost:/media/backup5>
eros@localhost:~> cat /usr/etc/profile.local | grep -i umask
cat: /usr/etc/profile.local: No such file or directory
eros@localhost:~>
eros@localhost:~> cat /usr/etc/profile | grep -i umask
eros@localhost:~>
eros@localhost:/media/backup5> cat /home/eros/.profile | grep -i umask
eros@localhost:/media/backup5>
eros@localhost:/media/backup5> cat /etc/login.defs | grep -i umask
cat: /etc/login.defs: No such file or directory
eros@localhost:/media/backup5>
eros@localhost:/media/backup5> cat /etc/login.defs.d/70-yast.defs | grep -i umask
cat: /etc/login.defs.d/70-yast.defs: No such file or directory
eros@localhost:/media/backup5>
eros@localhost:/media/backup5> cat /etc/pam.d/login | grep -i umask
cat: /etc/pam.d/login: No such file or directory
eros@localhost:/media/backup5>
eros@localhost:~> cat /usr/etc/login.defs | grep -i umask
# Default initial "umask" value used by login(1) on non-PAM enabled systems.
# Default "umask" value for pam_umask(8) on PAM enabled systems.
# UMASK is also used by useradd(8) and newusers(8) to set the mode for new
UMASK 002
# If HOME_MODE is not set, the value of UMASK is used to create the mode.
# Enable setting of the umask group bits to be the same as owner bits
eros@localhost:~>
-------------------------------------------------------------------------
15.6 16.0i 16.0u
-------------------------------------------------------------------------
usb mounted disk drwxrwxrwx drwxrwxrwx drwxrwxrwx
umask 0002 0002 0022 why not 0002?
touch test -rw-rw-r-- -rw-rw-r-- -rw-r--r--. why rw-r and the dot?
cat file | grep -i umask in:
/etc/profile #umask 022 #umask 022 umask 002
/etc/profile.local no file no file umask 002
/usr/etc/profile.local no file no file no file
/usr/etc/profile no file nothing nothing
/home/user/.profile nothing nothing umask 002
/etc/login.defs UMASK 002 no file no file
/etc/login.defs.d/70-yast.defs UMASK 022 no file UMASK 022
/etc/pam.d/login nothing no file session optional pam_umask.so umask=0002
/usr/etc/login.defs no file UMASK 002 UMASK 002