Manuel Antonio Camacho Quesada wrote:
Dear friends:First, let me say that this is a monster security issue. I am sure that you probably can see this and must have a good reason (other than lazyness, doesn't count)May workstation is intended for engineering work only (well, surfing to the
internet, too! =) ). I only have root and one user account. As you may
imagine, I always log as the "user", and whenever I require some
maintenance, su to root from within my account.Now the question: is there any way to make a log directly to my account?
(preferably with graphical login to start X at once).So much for the sermon. You can do this via inittab. Make sure you have a boot floppy. You will be messing with the main script that boots your machine.
Try this.
Make a copy of /etc/inittabAdd the following line to the end of /etc/inittab: The respawn makes it return to this state so that this user is logged in at logout. You can change respawn to once if this is not the behavior that you are looking for.
xu:4:respawn:/bin/su --login username -c startx
Then tell init to reread the file :
telinit q
to test :
telinit 4
If you get a message about not having console ownership, you probably have a newer version of redhat and will need to comment out the following line in /etc/pam.d/xserver:
auth required /lib/security/pam_console.so
Once everything is working, you can make runlevel 4 the default by changing the default line at the top of /etc/inittab to:
id:4:initdefault:
reboot to test
man init is your friend.
If you have problems booting you can type linux 3 at the lilo prompt (assuming the label for your kernel is linux of course)
Let me know if you have any problems. If you totally hose the machine you can always boot from a rescue disk and put back your copy of inittab
Hope this helps.
Bret
