Default Permissions

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Default Permissions

Post by inukaze »

This is a re-post i do too in -> https://www.linuxquestions.org/question ... ost6578470

Hi there again, look, yesterday, making some test on Porteus USB Live Mode.
Just for start Cisco Packet Tracer 8.0 bypassing Login Window.

I do the follow

01 - I create a group called "sin-internet"

Code: Select all

groupadd sin-internet
02 - Use iptables for make the group "sin-internet" does not have internet access

Code: Select all

iptables -A OUTPUT -m owner --gid-owner sin-internet -j DROP
ip6tables -A OUTPUT -m owner --gid-owner sin-internet -j DROP
iptables-save
ip6tables-save

03 - i for the restart of ethernet device, eth0 :

Code: Select all

su -c 'IDR="eth0" ; \
/etc/rc.d/rc.networkmanager stop ; /etc/rc.d/rc.inet1 stop ; /etc/rc.d/rc.inet2 stop ; /etc/rc.d/rc.inetd stop ; \
/etc/rc.d/rc.inet1 start ; /etc/rc.d/rc.inet2 start ; /etc/rc.d/rc.inetd start ; /etc/rc.d/rc.networkmanager start ; \
ip link set "$IDR" down ; ip link set "$IDR" up' root
04 - in the file /etc/sudoers i add the follow

Code: Select all

## Same thing without a password
# %wheel ALL=(ALL:ALL) NOPASSWD: ALL
%wheel    ALL=(:sin-internet)      NOPASSWD: ALL
%sudo     ALL=(:sin-internet)      NOPASSWD: ALL
i save, and exit

05 - Add the user to groups wheel and sin-internet, and Change the group in all file and sub-folder inside the path "/opt/pt"

Code: Select all

sudo gpasswd -a "$USER" -g wheel
sudo gpasswd -a "$USER" -g sin-internet
cd /opt/pt
sudo chown "$USER:sin-internet" -R *
06 - Test the cisco packet tracer does show login window :

Code: Select all

sudo -g sin-internet /opt/pt/packettracer

07 - If all works fine, in the /etc/rc.d/rc.local i add the follow lines :

Code: Select all

Directorio="/opt/pt"
if [ -d "$Directorio" ]; then
	cd "$Directorio"
	iptables -A OUTPUT -m owner --gid-owner sin-internet -j DROP &> /dev/null
	iptables-save &> /dev/null
	ip6tables -A OUTPUT -m owner --gid-owner sin-internet -j DROP &> /dev/null
	ip6tables-save &> /dev/null
	$(chown "guest:sin-internet" -R *) &
fi
But the thing was, before i forgot add the line

Code: Select all

cd "$Directorio"
Then the command

Code: Select all

(chown "guest:sin-internet" -R *)
was applied to all mounted partitions like the own Porteus USB, Salix 15.0, Slackware(64) 15.0

Then i not had idea which are the default permissons for entere system and what things need very specific permissions, like : lightdm, lxdm, xfce, xfce-sessions, libblock

basically the things control the session, and allow common user things like use power down, restart. the thing controls which partitions are in use, the automount of flash usb pendrive.

during boot i can see this message
Mon Jun 23 18:17:14 2025: ** (lightdm:1286): WARNING **: 18:17:14.815: Error getting user list from org.freedesktop.Accounts: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute program org.freedesktop.Accounts: Permission denied
i don0t know if was a good idea follow this information or use the commands on this article -> https://stackoverflow.com/questions/405 ... g-my-files

i really dont want reinstall from scratch salix neither slackware.
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Re: Default Permissions

Post by inukaze »

In first instance the follow works :

Like root

Code: Select all

slapt-get -i --reinstall lightdm libblockdev xdg-desktop-portal xdg-desktop-portal-gtk accountsservice dbus desktop-file-utils eudev libevdev p11-kit pkgconf polkit udisks udisks2 upower wpebackend-fdo xdg-user-dirs xdg-utils xdgmenumaker ; ldconfig
i got again in thunar show partitions like "proc" i solved with :
like root

Code: Select all

slapt-get --remove udisks udisks2 libblockdev gvfs
rm -rf /etc/libblockdev
rm -rf /etc/udisks2
slapt-get -i udisks2 libblockdev gvfs; ldconfig
Some applications like Brave Browser does not stop asking for keyring password and i never use that, i solve with
Like common user :

Code: Select all

rm ~/.local/share/keyrings/*
sudo slapt-get --remove gnome-keyring ; sudo ldconfig
In second instance with another script again i basically get the same result produced by :

Code: Select all

chmod 755 -R / ; chown root:root /
i know the default common user permissions are (on home of user):

Code: Select all

chmod 755 /home/inukaze ; cd /home/inukaze
chmod 644 .dmrc .ICEauthority .face .face.icon
chmod 600 .Xauthority

chmod -R 700 .cache .dbus .gconf .local
chmod -R 755 .config .mozilla .linuxmint 

chmod -R 755 Descargas Downloads 
chmod -R 755 Desktop Escritorio 
chmod -R 755 Documentos Documents
chmod -R 755 Imágenes Pictures
chmod -R 755 Música Music
chmod -R 755 Plantillas Templates
chmod -R 755 Público Public
chmod -R 755 Vídeos Videos
In the LinuxQuestions Forum the user "Petri Kaukasoina" give me this link -> https://slackware.osuosl.org/slackware6 ... NIFEST.bz2 and a link for script -> https://slackware.nl/people/alien/tools ... anifest.sh

Before i use that file and that script i try from Porteus Live USB

Code: Select all

mkdir -p /mnt/sda3
mount /dev/sda3 /mnt/sda3
mount --rbind /dev/pts /mnt/sda3/dev/pts
mount --rbind /dev /mnt/sda3/dev
mount --rbind /proc /mnt/sda3/proc
mount --rbind /sys /mnt/sda3/sys
mount --make-rslave /mnt/sda3/dev/pts
mount --make-rslave /mnt/sda3/dev
mount --make-rslave /mnt/sda3/proc
mount --make-rslave /mnt/sda3/sys
mount --bind /etc/resolv.conf /mnt/sda3/etc/resolv.conf
chroot /mnt/sda3

slapt-get --install --reinstall aaa_glibc-solibs aaa_libraries aaa_terminfo coreutils etc glibc glibc-i18n glibc-profile groff libnsl libssh ncurses network-scripts polkit util-linux
Leyendo listas de paquetes...Hecho
Se actualizarán los siguiente paquetes:
  aaa_glibc-solibs glibc glibc-i18n glibc-profile libssh 
Se reinstalarán los siguientes paquetes:
  aaa_libraries aaa_terminfo coreutils etc groff libnsl ncurses network-scripts 
  polkit util-linux 
5 actualizados, 10 reinstalados, 0 recién instalados, 0 para quitar, 0 no actualizados.
Se necesita obtener 34,1MB/39,9MB de archivos.
Después de descomprimir, se liberarán 277,7MB de espacio en disco.
¿Desea continuar? [y/N] y
1/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ aaa_glibc-solibs 2.33-x86_64-8_slack15.0 [2,6MB]...Hecho
2/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ glibc 2.33-x86_64-8_slack15.0 [5,0MB]...Hecho
3/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ glibc-i18n 2.33-x86_64-8_slack15.0 [11,5MB]...Hecho
4/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ glibc-profile 2.33-x86_64-8_slack15.0 [1,4MB]...Hecho
5/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ libssh 0.11.2-x86_64-1_slack15.0 [260,0kB]...Hecho
6/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ aaa_libraries 15.0-x86_64-19 [9,8MB]...Hecho
7/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ aaa_terminfo 6.3-x86_64-1 [52,0kB]...Hecho
9/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ etc 15.0-x86_64-17 [28,0kB]...Hecho
10/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ groff 1.22.4-x86_64-4 [2,2MB]...Hecho
12/15 Obtener http://slackware.uk/salix/x86_64/slackware-15.0/ ncurses 6.3-x86_64-1 [1,3MB]...Hecho

Preparando para reemplazar aaa_glibc-solibs-2.33_multilib-x86_64-7alien con aaa_glibc-solibs-2.33-x86_64-8_slack15.0
Upgrading package aaa_glibc-solibs-2.33_multilib-x86_64-7alien -> aaa_glibc-solibs-2.33-x86_64-8_slack15.0...
| aaa_glibc-solibs (shared GNU C libraries)
|
| This package contains the shared libraries, binaries, and support
| files required to run most Linux applications linked with glibc.
|
|
|
|
|
|
|
|
|
Preparando para reemplazar aaa_libraries-15.0-x86_64-19 con aaa_libraries-15.0-x86_64-19
Reinstalling package aaa_libraries-15.0-x86_64-19...
| aaa_libraries (shared libraries needed by many programs)
|
| This is a collection of shared libraries needed to run Linux programs.
| These libraries are gathered from other Slackware packages and are
| intended to give a minimal initial set of libraries.
|
|
|
|
|
|
|
|
Preparando para reemplazar aaa_terminfo-6.3-x86_64-1 con aaa_terminfo-6.3-x86_64-1
Reinstalling package aaa_terminfo-6.3-x86_64-1...
| aaa_terminfo (a basic collection of terminfo entries)
|
| This is a starter set of files from the terminfo database, which
| should be enough in most cases. The complete set (from which this
| is derived) can be found in the ncurses package.
|
| The terminfo database describes the characteristics of terminals, so
| don't try to log in without this package. :-)
|
|
|
|
|
Preparando para reemplazar coreutils-9.5-x86_64-1_slack15.0 con coreutils-9.5-x86_64-1_slack15.0
Reinstalling package coreutils-9.5-x86_64-1_slack15.0...
| coreutils (core GNU utilities)
|
| These are the GNU core utilities, the basic command line programs
| such as 'mkdir', 'ls', and 'rm' that are needed for the system to
| run. This package is the union of the GNU fileutils, sh-utils, and
| textutils packages. Most of these programs have significant
| advantages over their Unix counterparts, such as greater speed,
| additional options, and fewer arbitrary limits.
|
|
|
|
|
Preparando para reemplazar etc-15.0-x86_64-17 con etc-15.0-x86_64-17
Reinstalling package etc-15.0-x86_64-17...
| etc (system configuration files)
|
| System configuration files. The /etc directory is traditionally the
| location where configuration files are found.
|
|
|
|
|
|
|
|
|
WARNING: Directory already exists *behind the symlink* on filesystem. This may break upgrade/remove if you change that symlink in the future. (var/run)
chown: warning: '.' should be ':': «root.utmp»
chown: warning: '.' should be ':': «root.shadow»
Preparando para reemplazar glibc-2.33_multilib-x86_64-7alien con glibc-2.33-x86_64-8_slack15.0
Upgrading package glibc-2.33_multilib-x86_64-7alien -> glibc-2.33-x86_64-8_slack15.0...
| glibc (GNU C libraries)
|
| This package contains the GNU C libraries and header files. You'll
| need this package to compile programs.
|
| The GNU C library was originally authored by Roland McGrath.
|
| Homepage: https://www.gnu.org/software/libc/
|
|
|
|
|
WARNING: Directory already exists *behind the symlink* on filesystem. This may break upgrade/remove if you change that symlink in the future. (var/run)
Preparando para reemplazar glibc-i18n-2.33_multilib-x86_64-7alien con glibc-i18n-2.33-x86_64-8_slack15.0
Upgrading package glibc-i18n-2.33_multilib-x86_64-7alien -> glibc-i18n-2.33-x86_64-8_slack15.0...
| glibc-i18n (locale files from glibc)
|
| These files go in /usr/lib/locale, /usr/share/i18n/, and
| /usr/share/locale/ to provide internationalization support.
| You'll need this package unless you will be using US English only.
|
|
|
|
|
|
|
|
Preparando para reemplazar glibc-profile-2.33_multilib-x86_64-7alien con glibc-profile-2.33-x86_64-8_slack15.0
Upgrading package glibc-profile-2.33_multilib-x86_64-7alien -> glibc-profile-2.33-x86_64-8_slack15.0...
| glibc-profile (GNU C libraries with profiling support)
|
| This package contains static versions of the GNU C libraries with
| support for profiling binaries using gprof. gprof calculates how
| much time a program spends in each routine which can suggest where
| to concentrate efforts to improve performance.
|
| See the gprof man page for more details.
|
|
|
|
|
Preparando para reemplazar groff-1.22.4-x86_64-4 con groff-1.22.4-x86_64-4
Reinstalling package groff-1.22.4-x86_64-4...
| groff (document formatting system)
|
| The GNU groff package provides versions of troff, nroff, eqn, tbl, and
| other Unix text-formatting utilities. Groff is used to 'compile' man
| pages stored in groff/nroff format into a form which can be printed or
| displayed on the screen. These man pages are stored in compressed
| form in the /usr/man/man? directories.
|
|
|
|
|
|
Preparando para reemplazar libnsl-1.3.0-x86_64-3 con libnsl-1.3.0-x86_64-3
Reinstalling package libnsl-1.3.0-x86_64-3...
| libnsl (NIS/YP and NIS+ library)
|
| This package contains the libnsl library. This library contains the
| public client interface for NIS(YP) and NIS+. This code was formerly
| part of glibc, but is now standalone to be able to link against TI-RPC
| for IPv6 support.
|
| Homepage: https://github.com/thkukuk/libnsl
|
|
|
|
|
Preparando para reemplazar libssh-0.10.6-x86_64-1_slack15.0 con libssh-0.11.2-x86_64-1_slack15.0
Upgrading package libssh-0.10.6-x86_64-1_slack15.0 -> libssh-0.11.2-x86_64-1_slack15.0...
| libssh (library implementing ssh protocols)
|
| libssh is a mulitplatform C library implementing the SSHv2 and SSHv1
| protocol on client and server side. With libssh, you can remotely
| execute programs, transfer files, and use a secure and transparent
| tunnel for your remote applications.
|
| Homepage: http://www.libssh.org/
|
|
|
|
|
Preparando para reemplazar ncurses-6.3-x86_64-1 con ncurses-6.3-x86_64-1
Reinstalling package ncurses-6.3-x86_64-1...
| ncurses (CRT screen handling and optimization package)
|
| The ncurses (new curses) library is a free software emulation of
| curses in System V Release 4.0, and more. It uses terminfo format,
| supports pads and color and multiple highlights and forms characters
| and function-key mapping, and has all the other SYSV-curses
| enhancements over BSD curses.
|
| Homepage: https://invisible-island.net/ncurses/
|
|
|
|
Preparando para reemplazar network-scripts-15.0-noarch-19_slack15.0 con network-scripts-15.0-noarch-19_slack15.0
Reinstalling package network-scripts-15.0-noarch-19_slack15.0...
| network-scripts (Scripts to configure a network)
|
| These are the basic scripts and files used to define a network and
| configure network interfaces on Linux. Most of the original
| /etc files were written by Fred N. van Kempen, or borrowed from BSD.
| The rc.inet1 and rc.inet2 scripts were mostly written by Patrick
| Volkerding, with suggestions and fixes from hundreds of contributors
| over the years.
|
|
|
|
|
WARNING: Directory already exists *behind the symlink* on filesystem. This may break upgrade/remove if you change that symlink in the future. (var/log/setup)
Preparando para reemplazar polkit-0.120-x86_64-3_slack15.0 con polkit-0.120-x86_64-3_slack15.0
Reinstalling package polkit-0.120-x86_64-3_slack15.0...
| polkit (authentication framework)
|
| PolicyKit is an application-level toolkit for defining and handling
| the policy that allows unprivileged processes to speak to privileged
| processes. PolicyKit is specifically targeting applications in rich
| desktop environments on multi-user UNIX-like operating systems.
|
| Homepage: http://www.freedesktop.org/wiki/Software/polkit
|
|
|
|
|
WARNING: Post-installation script failed. (256)
Preparando para reemplazar util-linux-2.37.4-x86_64-3_slack15.0 con util-linux-2.37.4-x86_64-3_slack15.0
Reinstalling package util-linux-2.37.4-x86_64-3_slack15.0...
| util-linux (a huge collection of essential utilities)
|
| The util-linux package is a huge collection of random utilities
| that are essential to run a Linux system.
|
| Homepage: https://www.kernel.org/pub/linux/utils/util-linux/
|
|
|
|
|
|
|
Hecho
root[~]#
i restart and the thing goes wrong, because the 32 Bits mode not load all things fine like before, i repeat the steps for mount and use chroot but i follow the steps of "Dirty" mode of multilib -> https://docs.slackware.com/slackware:multilib

and that fix the system enter in 64 Bits mode instead 32 Bits mode.
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Re: Default Permissions

Post by inukaze »

in second instance, i use the script requiere the MANIFEST file, after around 9 hours, and i just the every line was "usr/doc" i just cancel that some minutes ago, i restart the system to check if i got good results and looks like partially yes

The things i notice i no had done on Salix
A - Set the tty resolution to 1024x768x16bpp -> i use with links web browser, i don't know why nobody had create a mode using framebuffer to make something similar to desktop environment, like was windows 3.x, and apps looks like graphical but really does not be graphicals apps XD.

B - Install apps does not need graphical env, For example dosbox-0.74, vlc ( for use nvlc just for hear music, because i not have framebuffer access on nvlc to watch videos ).

i need research again which apps can be used without graphical system for
1 - web navigatiion (if possible email client, some years ago "elinks" support that)
2 - file explorer -> mc came with salix excelent
3 - gpm for use mouse in tty ( for some unknow reason when i install from repositories never works ) the rc.gpm file

i need manually launch something like

Code: Select all

/usr/sbin/gpm -m /dev/input/mice -t ps2 
4 - i need recompile again things like "ppsspp" and "retroarch" for "No X" mode, well i don't know if versions superiors of ppsspp v1.15 still supports that and retroarch the last time i do that was in the version 1.09.2

C - DOSBox-0.74 can't start show a message :

DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL Unable to open mouse

i try to solve by this way :
1 - Create a group called mouse

Code: Select all

groupadd -f mouse
2 - Add my user to group mouse

Code: Select all

gpasswd -a inukaze -g mouse
3 - i create the file /etc/udev/rules.d/75-mouse.rules with the follow content
KERNEL=="event?" NAME="input/%k", MODE=0660, GROUP="mouse"
KERNEL=="mouse?" NAME="input/%k", MODE=0660, GROUP="mouse"
KERNEL=="mice" NAME="input/%k", MODE=0660, GROUP="mouse"
4 - Reload udev :

Code: Select all

udevadm control --reload-rules && udevadm trigger
well if you can use "sudo" the system loads dosbox

The things was i do recently
1 - i had reinstall nvidia drivers with compat32
2 - i reinstall lightdm
3 - /etc/rc.d/rc.4 can't start lightdm correctly ( by the moment i don't know why the Xorg.0.log just say GPU deleted )
4 - i edit /etc/inittab and change the start mode from 4 to 3, save and restart
5 - if i use root like username not ask for password just enter, with my common user "inukaze" ask for password
6 - salix does not allow use startx
7 - if i use startx with my common user, try to start the grafical system but hang up entire pc
8 - in this last try i use "startxfce4" instead "startx" and by the moment i am using this
9 - by the moment i can use "sudo" or "su"
sudo
sudo: /usr/bin/sudo debe ser propiedad del uid 0 y tener el bit setuid establecido
su
Contraseña:
su: El servicio de autenticación no puede recuperar la información de autenticación
i will go to try

Code: Select all

echo "$(grep -v "usr/src" MANIFEST.ORIGINAL)" > M1
echo "$(grep -v "usr/doc" M1)" > M2
echo "$(grep -v "include" M2)" > M3
echo "$(grep -v "locale" M3)" > M4
echo "$(grep -v "icons" M4)" > M5
echo "$(grep -v "pixmaps" M5)" > MANIFEST
to try to use script again, but i just wait does not take 24hours XD. with that commands i reduce the file MANIFEST from almost 64MB to almost 25MB
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Re: Default Permissions

Post by inukaze »

Some fix can be useful :
sudo: /var/db/sudo/lectured is world writable

Code: Select all

chmod 700 /var/db/sudo/lectured
chown root:root /var/db/sudo/lectured
sudo: /usr/bin/sudo debe ser propiedad del uid 0 y tener el bit setuid establecido
Fix ( you can put this on /etc/rc,d/rc.local during boot for ever fix during booting ) :

Code: Select all

chmod 4755 /usr/bin/sudo
chown root:root /etc/sudoers
chown root:root /usr/bin/sudo
chown -R root:root /usr/bin/sudo
chmod -R a=rx,u+ws /usr/bin/sudo
su: El servicio de autenticación no puede recuperar la información de autenticación
Fix

Code: Select all

sudo packagemanager --install --reinstall shadow ; sudo ldconfig
locate: no se puede abrir `/var/lib/mlocate/mlocate.db': Permiso denegado
Fix

Code: Select all

sudo chmod 644 /var/lib/mlocate/mlocate.db
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Re: Default Permissions

Post by inukaze »

umm i don't know if now a startup script called "cgroups" is working, but i can't use "video acceleration" (dri) with "nvidia" properaty driver, the games instead 60 FPS like Starcraft64 on retroarch, are in 2-3 FPS

i already had re-installed nvidia driver, from txz package i produce before with 32 Bits compat enabled.

with my user on a terminal window :

Code: Select all

glxinfo
name of display: :0
display: :0 screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
Why ? must be NVIDIA, i had already installed the propetary drivers, and my /etc/X11/xorg.conf content is

Code: Select all

# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings:  version 390.157  (root@Slack64..)  dom 23 jun 2024 10:41:53 -04
Section "DRI"
	Mode 0660
	Group "vglusers"
EndSection

# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 390.157  (root@Slack64..)  dom 23 jun 2024 15:34:16 -04
# Inukaze config for Nvidia-Cards
# Debian, put in /etc/X11/xorg.conf 
# Manjaro mwhd put in /etc/X11/mhwd.d/nvidia.conf

Section "ServerLayout"
    Identifier     "Default Layout"
    Screen      0  "Screen0" 0 0
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Module"
    Load           "vbe"
    Load           "bitmap"
    Load           "bitmap" # bitmap-fonts
    Load           "int10"
    Load           "type1"
    Load           "freetype"
    Load           "synaptics"
#Ya es interno :
#    Load           "glx"	#Carga automaticamente aunque no se especifique.
#    Load           "ddc"	# ddc probing of monitor
#    Load           "dbe"
#    Load           "dri2"
#    Load           "extmod"
#    Load           "record"


EndSection

Section "ServerFlags"
    Option         "DontZap" "False"
    Option         "Xinerama" "0"
EndSection

Section "InputDevice"
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "InputDevice"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputClass"
    Identifier         "Keyboard Defaults"
    MatchIsKeyboard    "yes"
    Option         "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Toshiba"
    ModelName      "Toshiba Matsushita Display Technology Co., Ltd LCD-MONITOR"
    HorizSync       30.0 - 82.0
    VertRefresh     56.0 - 76.0
    Option         "DPMS" "TRUE"
EndSection

Section "Device"

# Aa la version 304.88 , El Sistema se vuelve muy lento
# Aqui esta el Arreglo de Lentitud :
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 620"
EndSection

Section "Screen"

# Not Used Options
# Removed Option "metamodes" "CRT: 1152x864_75 +0+0, CRT: 1024x768_60 +0+0, TV: 1024x768 +0+0; CRT: 800x600_60 +0+0, TV: nvidia-auto-select +0+0"
# Removed Option "SLI" "0"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "AddARGBGLXVisuals" "True"
    Option         "DPMS" "True"
    Option         "TwinViewXineramaInfoOrder" "CRT-0"
#   Option         "nvidiaXineramaInfoOrder" "True"	#Unable to match display device name "True" from "nvidiaXineramaInfoOrder"
    Option         "AllowGLXWithComposite" "True"
    Option         "TripleBuffer" "True"
    Option         "RenderAccel" "True"
    Option         "HWCursor" "True"
    Option         "RegistryDwords" "PerfLevelSrc=0x3333"
    Option         "NoPowerConnectorCheck" "True"
    Option         "UseEdidFreqs" "True"
    Option         "backingstore" "True"
#   Option         "DPI" "92"	#Invalid DPI string "92. DPI set to (81, 104); computed from "UseEdidDpi" X config option
#Cuando Se Actualizan los Controladores Privatidos
    Option         "UBB" "True"
    Option         "GLShaderDiskCache" "True"
    Option         "Dac8Bit" "True"
    Option         "Overlay" "True"
    Option         "CIOverlay" "True"
    Option         "TransparentIndex" "25"
    Option         "OverlayDefaultVisual" "True"
    Option         "nvidiaXineramaInfo" "True"
    Option         "MultisampleCompatibility" "True"
    Option         "DamageEvents" "True"
    Option         "AllowSHMPixmaps" "True"
    Option         "AllowUnofficialGLXProtocol" "True"
    Option         "Interactive" "True"
    Option         "ConstrainCursor" "True"
    Option         "UseHotplugEvents" "True"
    Option         "Stereo" "0"
    Option         "metamodes" "1280x960_60 +0+0; 1152x864_75 +0+0; 800x600_60 +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
#Nvidia 390.157 > No se utilizan las siguientes opciones
#    Option         "TwinView" "0" #Nvidia 390.157 > No se utiliza
#    Option         "AddARGBVisuals" "True"
#    Option         "NoLogo" "True"
#    Option         "DRI" "True"
#    Option         "CursorShadow" "True"
#    Option         "NvAGP" "3"
#    Option         "XAANoOffscreenPixmaps" "True"
# Cuando Se Actualizan los Controladores Privatidos
#    Option         "UseEvents" "True"
#    Option         "InitializeWindowBackingPixmaps" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
#    Option         "DRI" "Enable"	#Opcion no reconocida en nvidia 390.157
    Option         "RandR" "Enable"
    Option         "RENDER" "Enable"
    Option         "Composite" "Enable"
EndSection
NOTE : with nvidia propetary drivers, the most common you can't use the "VirtualGL" / "vgl" for virtual machines.

Is because i use "starxfce4" from my user cli login instead "startx" ( this hang up entire pc ), and lightdm does not working


umm the change permissions with chmod and/or chown on / produce a mess on GNU/Linux system i think the chmod and/or chown,chgrp on / partition, must be protected, when the user try, wait 10 seconds for an answer, is the user does not input nothing the default answer must be no

another thing can do a mess is when the free space says 0 Bytes or -1 Byte, some years ago the unique solution i found was do a medium level format using "Victoria 5.02 for Windows XP" xD the rest i can't do nothing on that disk xD.
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Re: Default Permissions

Post by inukaze »

Finally the script for fix permissions finish the job. with my edited version of MANIFEST around 25MB, take almost 12 hours to finish.


Well for fix nvidia i have the packages on the root home folder, and i just do the follow like root :

removepkg nvidia-legacy390-kernel-390.157_5.15.161-x86_64-2_SBo.tgz
removepkg nvidia-legacy390-driver-390.157_multilib-x86_64-7_SBo.tgz
echo -ne "blacklist nouveau\noptions nouveau modeset=0" | tee /etc/modprobe.d/BLACKLIST-nouveau.conf
installpkg nvidia-legacy390-kernel-390.157_5.15.161-x86_64-2_SBo.tgz
installpkg nvidia-legacy390-driver-390.157_multilib-x86_64-7_SBo.tgz

Code: Select all

packagemanager --remove lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings

rm -rf /var/log/lightdm
rm -rf /var/lib/lightdm
rm -rf /var/lib/lightdm-data
rm -rf /var/lib/gdm
rm -rf /var/cache/lightdm
rm -rf /usr/share/polkit-1/rules.d/42-lightdm.rules

packagemanager --install lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings
i test first lightdm works correctly before edit /etc/inittab to switch autostart in mode 3 for mode 4

Code: Select all

chmod +x /etc/rc.d/rc.4
sh /etc/rc.d/rc.4
Works fine, restart entire system :D, and now i get my system back :D

i edit my /etc/inittab i do the follow edits :

For automatically reach graphical env :

Code: Select all

id:4:initdefault:

autologin my user on tty6, Sometimes i do script for run games on this tty, specially windows games in 16 Bits, this prevent Xorg hangs.

Code: Select all

c6:1235:respawn:/sbin/agetty -a inukaze 38400 tty6 linux
But the before needs too, the follow thing

Code: Select all

echo 'allowed_users=anybody' | sudo tee /etc/X11/Xwrapper.config
to allow start graphical env in another tty for my user
inukaze
Posts: 43
Joined: 24. Nov 2024, 18:42

Re: Default Permissions

Post by inukaze »

In resume all things i do for fix :

With root user :

1 - Download this file :
Petri Kaukasoina;6578400 wrote:Maybe this helps you:
https://slackware.osuosl.org/slackware64-15.0/slackware64/MANIFEST.bz2
2 - Extract the "MANIFEST" file and rename to "MANIFEST.ORIGINAL" and do the follow in a terminal :

Code: Select all

echo "$(grep -v "usr/src" MANIFEST.ORIGINAL)" > M1
echo "$(grep -v "usr/doc" M1)" > M2
echo "$(grep -v "include" M2)" > M3
echo "$(grep -v "locale" M3)" > M4
echo "$(grep -v "icons" M4)" > M5
echo "$(grep -v "pixmaps" M5)" > MANIFEST
This reduce filesize from almost 64MB to 25MB aprox.

3 - Download the script for use the edited MANIFEST File :
i put the files "restore_fileperms_from_manifest.sh" and edited "MANIFEST" on " / " in the root partition i want to fix file permissions, on my pc takes around 12 hours to finish that job

i edit the file /etc/inittab and chage the init mode from 4 to 3, and i add autologin for my user on tty6
id:3:initdefault:
c6:1235:respawn:/sbin/agetty -a inukaze 38400 tty6 linux
save the changes and exit

i remove the execution permission of ec.4 for disable automatic start the graphical env.

Code: Select all

chmod -x /etc/rc.d/rc.4

in this point i had restart the entire pc, and login like root on tty1, on the rest of tty from 2 to 6 i login with my user "inukaze"

in tty2, i try to run dosbox but appears the message
DOSBox version 0.74-3
Copyright 2002-2019 DOSBox Team, published under GNU GPL.
---
Exit to error: Can't init SDL Unable to open mouse
i try solve making the follow, in tty1 (like root)

Code: Select all

groupadd -f mouse
gpasswd -a inukaze -g mouse

i manually add the follow lines in /etc/udev/rules.d/75-mouse.rules
[quote]KERNEL=="mice" NAME="input/%k", MODE=0660, GROUP="mouse"
KERNEL=="mouse?" NAME="input/%k", MODE=0660, GROUP="mouse"
KERNEL=="event?" NAME="input/%k", MODE=0660, GROUP="mouse"[/quote]

i restart again, i see the dmesg output message : 
"Error in line 1 /etc/udev/rules.d/75-mouse.rules unexpected "," in character 32"
"Error in line 2 /etc/udev/rules.d/75-mouse.rules unexpected "," in character 34"
"Error in line 3 /etc/udev/rules.d/75-mouse.rules unexpected "," in character 34"

i edit again /etc/udev/rules.d/75-mouse.rules and i put the follow :
[quote]SUBSYSTEM=="input", ATTRS{name}=="ImPS/2 Generic Wheel Mouse", MODE="0666", ENV{ID_INPUT_MOUSE}="1"

#ATTRS{name} -> must be extract from output of commands :
# cat /proc/bus/input/devices		#Read and determine which event is your mouse
# Notice in the output lines like :
# I: Bus=0011 Vendor=0002 Product=0005 Version=0000
# N: Name="ImPS/2 Generic Wheel Mouse"	#This is the line you looking for.
# P: Phys=isa0060/serio1/input0
# S: Sysfs=/devices/platform/i8042/serio1/input/input4
# U: Uniq=
# H: Handlers=mouse0 event9 
# B: PROP=1
# B: EV=7
# B: KEY=70000 0 0 0 0
# B: REL=103


#KERNEL=="mice", MODE=0660, OWNER="root", GROUP="mouse"
#KERNEL=="mouse?", MODE=0660, OWNER="root", GROUP="mouse"
#KERNEL=="event?", MODE=0660, OWNER="root", GROUP="mouse"[/quote]

i restart entire pc again, i try again, dosbox ran, for few minutes
but when i put keys, the keyboard print wrong characters, and after hang up entire pc
i need a better solution for that XD, i restart, and comment out all lines by now


Again i restart the entire pc but this time

In the tty1 i let the script "restore_fileperms_from_manifest.sh" working
[code]cd /
sh restore_fileperms_from_manifest.sh
meanwhile the script do it job, i remember some years ago i learn on Debian 8 a lot of things of working without graphical session the first things i do its check if i had the follow programs

mc -> file manager
dosbox -> msdos emulator

retroarch -> i have the flatpak, but this version requiere graphical env to work, when i compile manually i ever put does not requiere X

ppsspp -> the same case of retroarch

links (version 2) or links2 -> web browser, elinks works great with email client like gmail before, but is not working on my Slackware or salix

vlc -> the "nvlc" works for hear music, because players like cmus or moc not wanna work on my slackware and/or salix

i ran a custom compile version of dosbox like root user and that works for let me allow play some games, meanwhile the script working fixing file permissons, the thing i not remember is my custom version start graphical env without nothing and start dosbox preconfigured XD, play Supaplex after Eye Of Beholder ever is fun.

meanwhile i play on dosbox, i think i not have configured the programs to use on just "tty" mode, without Xorg / Wayland
like i do when i use Slackware(64) 14.2 things like

A - Enable Framebuffer access for video, to enable resolutions like 1024x768x16bpp on tty
B - Custom compilations of programs for use without graphical env like : retroarch, ppsspp, mplayer

C - Custom things for "mc" program to enable file associations like : image files using "zgv" image viewer, or test if the custom script for download youtube video and use mplayer in sdl mode to play it

Why never someone had create something similar to Windows 3.X, for GNU/Linux framebuffer, to looks like a graphical env but really does not its, links web browser works and look nice in framebuffer video mode.


4 - Fix sudo and su :

sudo: /var/db/sudo/lectured is world writable

Code: Select all

chmod 700 /var/db/sudo/lectured
chown root:root /var/db/sudo/lectured

sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
chmod 4755 /usr/bin/sudo
chown root:root /etc/sudoers
chown root:root /usr/bin/sudo
chown -R root:root /usr/bin/sudo
chmod -R a=rx,u+ws /usr/bin/sudo[/code]

In anothers distros is possible you need this instead :

Code: Select all

chown root:root /usr/lib/sudo/sudoers.so
chmod -R a=rx,u+ws /usr/lib/sudo/sudoers.so
chown -R root:root /usr/lib/sudo/sudoers.so
chmod 4755 /usr/lib/sudo/sudoers.so
su: The authentication service cannot retrieve authentication information

Code: Select all

packagemanager --install --reinstall shadow
locate: cannot open `/var/lib/mlocate/mlocate.db': Permission denied

Code: Select all

sudo chmod 644 /var/lib/mlocate/mlocate.db
5 - Remove, Install and/or reinstall packages : i already have packages with nvidia propetary drivers with compat32 enabled.

Code: Select all

packagemanager --remove udisks udisks2 libblockdev gvfs lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings gnome-keyring

# i delete files of service i never use :
rm -rf /etc/rc,d/rc.krb5kdc 
rm -rf /etc/rc,d/rc.kadmind 
rm -rf /etc/rc,d/rc.kpropd 
rm -rf /etc/rc,d/rc.saslauthd 
rm -rf /etc/rc,d/rc.openldap 
rm -rf /etc/rc,d/rc.anydesk 
rm -rf /etc/rc,d/rc.avahidaemon 
rm -rf /etc/rc,d/rc.avahidnsconfd 
rm -rf /etc/rc,d/rc.vboxadd-service 
rm -rf /etc/rc,d/rc.vboxautostart-service 
rm -rf /etc/rc,d/rc.vboxballoonctrl-service 
rm -rf /etc/rc,d/rc.vboxdrv 
rm -rf /etc/rc,d/rc.qemu-ga
rm -rf /etc/rc,d/rc.libvirt
rm -rf /etc/rc,d/rc.nfsd
rm -rf /etc/rc,d/rc.php-fpm
rm -rf /etc/rc,d/rc.spice-vdagent
rm -rf /etc/rc,d/rc.webmin
rm -rf /etc/rc,d/rc.wsdd2
rm -rf /etc/rc,d/rc.bluez-alsa
rm -rf /etc/rc,d/rc.bluetooth
rm -rf /etc/rc,d/rc.auditd
rm -rf /etc/rc,d/rc.auditd.conf
rm -rf /etc/rc,d/rc.AdGuardHome
rm -rf /etc/rc,d/rc.cups
rm -rf /etc/rc,d/rc.cups-browsed
rm -rf /etc/rc,d/rc.cups.orig
rm -rf /etc/rc,d/rc.mysqld
rm -rf /etc/rc,d/rc.pcmcia
rm -rf /etc/rc,d/rc.sanlock
rm -rf /etc/rc,d/rc.wdmd

# deleting residual files, for make the install of package put new fresh files.
rm -rf /var/log/lightdm
rm -rf /var/lib/lightdm
rm -rf /var/lib/lightdm-data
rm -rf /var/lib/gdm
rm -rf /var/cache/lightdm
rm -rf /usr/share/polkit-1/rules.d/42-lightdm.rules
rm -rf /etc/libblockdev
rm -rf /etc/udisks2
rm -rf /home/inukaze/.local/share/keyrings/*

packagemanager --install udisks2 \
libblockdev \
gvfs \
lightdm \
lightdm-gtk-greeter \
lightdm-gtk-greeter-settings ; ldconfig


packagemanager --install --reinstall aaa_glibc-solibs \
aaa_libraries \
aaa_terminfo \
accountsservice \
coreutils \
dbus \
desktop-file-utils \
etc \
eudev \
glibc \
glibc-i18n \
glibc-profile \
groff \
libevdev \
libnsl \
libssh \
ncurses \
network-scripts \
p11-kit \
pkgconf \
polkit \
upower \
util-linux \
wpebackend-fdo \
xdg-desktop-portal \
xdg-desktop-portal-gtk \
xdg-user-dirs \
xdg-utils \
xdgmenumaker
Now its time for fix my system when login enter in 32 Bits mode instead 64 Bits, i need to apply the multilib "Quick n' Dirty" from SlackDocs -> https://docs.slackware.com/slackware:multilib

The quick 'n' dirty instructions

Code: Select all

cd /tmp

SLACKVER=15.0
mkdir multilib
cd multilib
lftp -c "open http://slackware.nl/people/alien/multilib/ ; mirror -c -e ${SLACKVER}"
cd ${SLACKVER}
upgradepkg --reinstall --install-new *.t?z
upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z ; ldconfig


Fix nvidia propetary driver :

Code: Select all

removepkg /root/nvidia-legacy390-kernel-390.157_5.15.161-x86_64-2_SBo.tgz
removepkg /root/nvidia-legacy390-driver-390.157_multilib-x86_64-7_SBo.tgz

echo -ne "blacklist nouveau\noptions nouveau modeset=0" | tee /etc/modprobe.d/BLACKLIST-nouveau.conf

installpkg nvidia-legacy390-kernel-390.157_5.15.161-x86_64-2_SBo.tgz
installpkg nvidia-legacy390-driver-390.157_multilib-x86_64-7_SBo.tgz

gpasswd -a inukaze -g video
well i add :

Code: Select all

echo 'allowed_users=anybody' | sudo tee /etc/X11/Xwrapper.config

Fix my user home files permissions :

Code: Select all

chmod 700 /home/inukaze
cd /home/inukaze
chgrp users -R * .*
chown inukaze:users -R * .*
chmod -R 755 * .*
chmod -R 700 .cache .dbus .gconf .local
chmod 644 .dmrc .ICEauthority .face .face.icon
chmod 600 .Xauthority

i restart entire system, login like root and test rc.4 works like expected

Code: Select all

sh /etc/rc.d/rc.4
The thing works like expected :D

Code: Select all

chmod +x /etc/rc.d/rc.4
edit the /etc/inittab and change init mode from 3 to 4
id:4:initdefault:
Finish the session i shutdown machine and power on again. the system was fixed.
Post Reply