If it is to run at system bootup, there won't be any users on it yet and you might have to define a local user for it to run as.
If this script can run at user login, you could add something to the default bashrc file. Either /etc/bashrc or /etc/skel/.bashrc to start it as that user. Aaron On Tue, Oct 11, 2011 at 9:36 AM, Peter Dimitrios <petedag...@gmail.com> wrote: > VCL sets up a userid / password for the end-user to login via SSH. I > was wondering how an image can reliably get that userid inside an init > script? Unfortunately, currentimage.txt has just computer > information, but no user= stanza to tell me who is currently using the > image (if anyone). My current technique is ENDUSER=$(ls -1 /home | > tail -n 1). If I've created other userids with home directories I > explicitly exclude them using something like ENDUSER=$(ls -1 /home | > grep -Ev "(^user$|^vncuser$|^winer$)" | tail -n 1). > -- Aaron Peeler Program Manager Virtual Computing Lab NC State University All electronic mail messages in connection with State business which are sent to or received by this account are subject to the NC Public Records Law and may be disclosed to third parties.