Results 1 to 2 of 2

Thread: PROBLEMS (???) found (User Group & Clean up script .desktop files)

  1. #1
    Join Date
    2013-Dec
    Location
    greece
    Posts
    14

    PROBLEMS (???) found (User Group & Clean up script .desktop files)

    1st of all i dont know the things below are bugs, or something else ....

    So,

    1)
    There is no 'pcscd' group, that udevd needs, (it mention this as an error in boot proccess )
    Looking back in an old install, i figure out that 'pcscd' has a gid of 127, when i tried to manual create this..., it was taken :
    Code:
      > grep ":127" /etc/group
      > sambashare:x:127:
    ,so i make a 'pcscd' group with gid 199 ...,
    this was an almost complete free choice ( 100<gid<200 ),
    so if am wrong, or incompatible in any way, please LET ME KNOW.


    2)
    i make a script, in order to remove some dead .desktop files. Here is my script :
    Code:
    #!/bin/bash
    
    CHK_PATHS="/usr/share/applications $HOME/.local/share/applications"
    CHK_PATHS="/usr/share/applications"
    
        for p in ${CHK_PATHS}; do
            for f in $p/*.desktop; do
                echo -n "\"$f\""
    
                ## get the command after the '=' and before any %arg, 
                ## (some .desktop files, have more than one Exec fields) 
                efile="`grep -i "^Exec=" $f 2>/dev/null |head -1 |cut -d \= -f2- |cut -d \% -f1`"
                echo -n " >$efile"
    
                ## is run throuh a shell ? 
                res=`echo "$efile" |grep "sh\ \-c" 2>/dev/null`
                if [ -n "$res" ]; then
                    efile=`echo "$efile" |cut -d \" -f2- |sed s/"\""/""/ |cut -d \; -f1`
                fi
                echo -n " >$efile"
    
                ## ...
                efile=`echo "$efile" |cut -d \  -f1`
                echo -n " >$efile"
    
                ## isnot in the PATH, then what ... ?
                ## ' >???' , not found in PATH
                ## ' >??!' , found by locate
                ## ' >!!!' , not found at all
                res=`which $efile`
                if [ -z "$res" ]; then
                    echo -n " >???"
                    res=`locate $efile|grep -v ".desktop$"`
                    if [ -z "$res" ]; then echo -n " >!!!"; else echo -n " >??! $res"; fi     
                fi    
                echo
            done
        done
    then i exec it :
    Code:
    usys-desktop-files |grep "\ >???"
    and i found theese :
    Code:
    "/usr/share/applications/kali-dnsrecon.desktop" >sh -c "dnsrecon.py -h;${SHELL:-bash}" >dnsrecon.py -h >dnsrecon.py >??? >/usr/share/dnsrecon/dnsrecon.py
    "/usr/share/applications/kali-mfcuk.desktop" >sh -c "mfcuk -h;${SHELL:-bash}" >mfcuk -h >mfcuk >??? >/mnt/nt-swap/ISOs/kali-linux/how-to/kali-menu-f58f8ab/desktop-files/kali-mfcuk.desktop
    "/usr/share/applications/kali-mfoc.desktop" >sh -c "mfoc -h;${SHELL:-bash}" >mfoc -h >mfoc >??? >/mnt/nt-swap/ISOs/kali-linux/how-to/kali-menu-f58f8ab/desktop-files/kali-mfoc.desktop
    "/usr/share/applications/kali-nasmshell.desktop" >sh -c "cd /usr/share/metasploit-framework/tools && ./nasm_shell.rb;${SHELL:-bash}" >cd /usr/share/metasploit-framework/tools && ./nasm_shell.rb >cd >??? >/boot/grub/cdboot.img
    "/usr/share/applications/kali-patterncreate.desktop" >sh -c "cd /usr/share/metasploit-framework/tools && ./pattern_create.rb;${SHELL:-bash}" >cd /usr/share/metasploit-framework/tools && ./pattern_create.rb >cd >??? >/boot/grub/cdboot.img
    "/usr/share/applications/kali-patternoffset.desktop" >sh -c "cd /usr/share/metasploit-framework/tools && ./pattern_offset.rb;${SHELL:-bash}" >cd /usr/share/metasploit-framework/tools && ./pattern_offset.rb >cd >??? >/boot/grub/cdboot.img
    "/usr/share/applications/kali-powersploit.desktop" >sh -c "cd /usr/share/powersploit/ && ls;${SHELL:-bash}" >cd /usr/share/powersploit/ && ls >cd >??? >/boot/grub/cdboot.img
    "/usr/share/applications/kali-sipsak.desktop" >sh -c "sipsak -h;${SHELL:-bash}" >sipsak -h >sipsak >??? >/mnt/nt-swap/ISOs/kali-linux/how-to/kali-menu-f58f8ab/desktop-files/kali-sipsak.desktop
    -1- i know my script isnot complete, (see "cd <path> && exec <cmd>") ...
    -2- i correct the 'xsser' that located in /usr/local/bin and not in /usr/bin/ ...
    -3- some .desktop files exist, but not installed,
    -4- if someone can extend my script with a 'sed' command .... that would be great, but i think the dist itself must correct any (?) errors ...

    thanks !

  2. #2
    Join Date
    2013-Dec
    Location
    greece
    Posts
    14
    the same again :
    after a yesterday ,
    Code:
     
    apt-get update
    apt-get dist-upgrade
    the `pcscd` group disappear from the /etc/group,
    and its place taken by the 'sambashare' group !

Similar Threads

  1. Volume Group Not Found Booting Kali
    By User25152 in forum Installing Archive
    Replies: 0
    Last Post: 2019-10-19, 20:38
  2. can't log in newly created user: /home/user/.ICEauthority not found
    By iceman81 in forum TroubleShooting Archive
    Replies: 2
    Last Post: 2013-09-29, 21:42

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •