Re: IRIX adduser command?
From: J.A. Gutierrez (spd_at_daphne.cps.unizar.es)
Date: 11/27/03
- Previous message: MStepansky: "Alias 7.0.1 qualificatons issues in R10K Indigo2/Impacts"
- In reply to: Khalid Schofield: "Re: IRIX adduser command?"
- Next in thread: Khalid Schofield: "Re: IRIX adduser command?"
- Reply: Khalid Schofield: "Re: IRIX adduser command?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 Nov 2003 11:16:15 +0000 (UTC)
Khalid Schofield <oums0246@raven.linux.ox.ac.uk> wrote:
: yeh the script is a botch but hay it works :-) Need to get it adding users
you may want to add passwd locking while you are appending
entries to /etc/passwd and /etc/shadow
cat > lckpwdf.c <<EOF
#include <stdio.h>
#include <shadow.h>
#include <unistd.h>
int main(int argc, char **argv, char **envp)
{
if(-1!=lckpwdf())
{
execvp( argv[1], &argv[1]);
ulckpwdf();
return (1);
}
else
{
fprintf(stderr,"Try again later\n");
return (0);
}
}
EOF
cc -o lckpwdf lckpwdf.c
use: ./lckpwdf my_script.sh
: to my /etc/postfix/aliases file as well as giving them a soft quota of 1Gb
: and a 2Gb hard quota.
: Any ideas of how to do this with gnu quota system?
why do you want to use gnu quota system in IRIX?
With IRIX quotas you can try:
- /usr/local/sbin/edq -----------------------------------------------------
#!/bin/sh
IFS=
PATH=/bin:/usr/etc
set -e
if [ $# -ne 4 ]
then
echo Usage: `basename $0` filesystem soft hard user
exit 1
else
EDITOR="/usr/local/sbin/.edq"
export EDITOR
FILESYS=$1
SOFT=$2
HARD=$3
export FILESYS SOFT HARD
edquota $4
exit 0
fi
---------------------------------------------------------------------------
- /usr/local/sbin/.edq ----------------------------------------------------
#!/bin/sh
EFILESYS=`echo $FILESYS |sed -e 's/\//\\\\\//g'`
ed $1 << ++
H
/$EFILESYS
d
a
fs $FILESYS kbytes (soft = $SOFT, hard = $HARD) inodes (soft = 0, hard = 0)
.
w
q
++
---------------------------------------------------------------------------
-- finger spd@shiva.cps.unizar.es for PGP / .mailcap tip of the day: / La vida es una carcel application/ms-tnef; cat '%s' > /dev/null / con las puertas abiertas text/x-vcard; cat '%s' > /dev/null / (A. Calamaro)
- Previous message: MStepansky: "Alias 7.0.1 qualificatons issues in R10K Indigo2/Impacts"
- In reply to: Khalid Schofield: "Re: IRIX adduser command?"
- Next in thread: Khalid Schofield: "Re: IRIX adduser command?"
- Reply: Khalid Schofield: "Re: IRIX adduser command?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]