You are not logged in.
Hello all,
I am trying to run a script at boot that does some commands. They need a password however, I tryed putting it into /etc/rc.d/rc.local and it just ran by it not allowing me to enter a password?
Any tips for this?
Thanks allot.
Offline
This may help:
http://ubuntu.wordpress.com/2005/09/07/ … at-bootup/
... especially the comments section ( su -c joe user )
Deej
Offline
Yes the password is actually to decrypt a gpg key so in this case the su -c command cannot work, Thanks allot for the help though deej. My fault for not specifying!
Offline
That is odd. rc.multi runs rc.local and inittab runs rc.multi as 'wait' (man inittab). What does your /etc/inittab say?
Offline
#
# /etc/inittab
#
# Runlevels:
# 0 Halt
# 1(S) Single-user
# 2 Not used
# 3 Multi-user
# 4 Not used
# 5 X11
# 6 Reboot
## Only one of the following two lines can be uncommented!
# Boot to console
id:3:initdefault:
# Boot to X11
#id:5:initdefault:
rc::sysinit:/etc/rc.sysinit
rs:S1:wait:/etc/rc.single
rm:2345:wait:/etc/rc.multi
rh:06:wait:/etc/rc.shutdown
su:S:wait:/sbin/sulogin -p
# -8 options fixes umlauts problem on login
c1:2345:respawn:/sbin/agetty -8 38400 vc/1 linux
c2:2345:respawn:/sbin/agetty -8 38400 vc/2 linux
c3:2345:respawn:/sbin/agetty -8 38400 vc/3 linux
c4:2345:respawn:/sbin/agetty -8 38400 vc/4 linux
c5:2345:respawn:/sbin/agetty -8 38400 vc/5 linux
c6:2345:respawn:/sbin/agetty -8 38400 vc/6 linux
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
# Example lines for starting a login manager
x:5:respawn:/usr/bin/xdm -nodaemon
#x:5:respawn:/usr/sbin/gdm -nodaemon
#x:5:respawn:/usr/bin/kdm -nodaemon
#x:5:respawn:/usr/bin/slim >& /dev/null
# End of file
Those are the contents. Thanks
Offline
Maybe init runs it in a weird way? (like without stdin) It's kind of hard to test it. Maybe you can use openvt to launch the command.
Offline