Hello,
In order to start some scripts from an user, it is better to favour INITTAB or /etc/init.d method?
Quote:
#include <unistd.h>
int main() {
execlp( "login", "login", "-f", "fred", 0);
}
then
gcc -o autologinfred autologinfred.c
then modify:
1:2345:respawn:/sbin/getty -n -l /usr/local/sbin/autologinfred 38400 tty1
|
then
change the .bashrc
or
/etc/init.d/S98startuserscripts
Code:
#! /bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
if [ `id -u` = 0 ] ; then
#echo switching to freevo user
#exec su --shell /bin/sh fred -c "$0 $@"
su --shell /bin/bash fred -c "sh $HOME/mysupermegascript"
fi
exit 0
What is more secured, what is more standard, what is better, what is more debian i.e. stable?