shell bypass 403

UnknownSec Shell

: /sbin/ [ dr-xr-xr-x ]

name : applygnupgdefaults
#!/bin/sh
# Apply defaults from /etc/gnupg/gpgconf.conf to all users       -*- sh -*-
#
# Copyright 2007 Free Software Foundation, Inc.
#
# This file is free software; as a special exception the author gives
# unlimited permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
#
# This file is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

PGM=applygnupgdefaults
errorfile=

error () {
  echo "$PGM: $*" >&2
  [ -n "$errorfile" ] && echo "$PGM: $*" >>$errorfile
}

info () {
  echo "$PGM: $*" >&2
}

if [ -n "$1" ]; then
    echo "usage: $PGM" >&2
    exit 1
fi

# Cleanup on exit
cleanup ()
{
    [ -n "$errorfile" -a -f "$errorfile" ] && rm "$errorfile"
}
trap cleanup EXIT SIGINT SIGHUP SIGPIPE
errorfile=$(mktemp "/tmp/$PGM.log.XXXXXX")
[ -n "$errorfile" -a -f "$errorfile" ] || exit 2

# Check whether we can use getent
if getent --help </dev/null >/dev/null 2>&1 ; then
    cat_passwd='getent passwd'
else
    cat_passwd='cat /etc/passwd'
    info "please note that only users from /etc/passwd are processed"
fi

if [ ! -f /etc/gnupg/gpgconf.conf ]; then
    error "global configuration file \`/etc/gnupg/gpgconf.conf' does not exist"
    exit 1
fi
if [ ! -f /etc/shells ]; then
    error "missing file \`/etc/shells'"
    exit 1
fi

if [ $(id -u) -ne 0 ]; then
    error "needs to be run as root"
    exit 1
fi

${cat_passwd} \
  | while IFS=: read -r user dmy_a uid dmy_c dmy_d home shell dmy_rest; do
    # Process only entries with a valid login shell
    grep </etc/shells "^$shell" 2>/dev/null >/dev/null || continue
    # and with an pre-existing gnupg home directory
    [ -d "$home/.gnupg" ] || continue
    # but not root
    [ "${uid:-0}" -eq 0 ] && continue
    info "running \"gpgconf --apply-defaults\" for $user"
    if su -l -s /bin/sh \
       -c 'gpgconf --apply-defaults && echo SUCCESS' $user \
       | tail -1 | grep ^SUCCESS >/dev/null ; then
      :
    else
      error "failed to update gnupg defaults for $user"
    fi
done

[ "$(wc -c <$errorfile)" -gt 0 ] && exit 1
exit 0

© 2025 UnknownSec
Web Design for Beginners | Anyleson - Learning Platform
INR (₹)
India Rupee
$
United States Dollar
Web Design for Beginners

Web Design for Beginners

in Design
Created by Linda Anderson
+2
5 Users are following this upcoming course
Course Published
This course was published already and you can check the main course
Course
Web Design for Beginners
in Design
4.25
1:45 Hours
8 Jul 2021
₹11.80

What you will learn?

Create any website layout you can imagine

Support any device size with Responsive (mobile-friendly) Design

Add tasteful animations and effects with CSS3

Course description

You can launch a new career in web development today by learning HTML & CSS. You don't need a computer science degree or expensive software. All you need is a computer, a bit of time, a lot of determination, and a teacher you trust. I've taught HTML and CSS to countless coworkers and held training sessions for fortune 100 companies. I am that teacher you can trust. 


Don't limit yourself by creating websites with some cheesy “site-builder" tool. This course teaches you how to take 100% control over your webpages by using the same concepts that every professional website is created with.


This course does not assume any prior experience. We start at square one and learn together bit by bit. By the end of the course you will have created (by hand) a website that looks great on phones, tablets, laptops, and desktops alike.


In the summer of 2020 the course has received a new section where we push our website live up onto the web using the free GitHub Pages service; this means you'll be able to share a link to what you've created with your friends, family, colleagues and the world!

Requirements

No prerequisite knowledge required

No special software required

Comments (0)

Report course

Please describe about the report short and clearly.

Share

Share course with your friends