Assume am in directory /home/userA
There is an environment variabe $XMLFILES that points to /u/xml/xmlfiles. The $XMLFILES environment variable is in userA's environment/profile
I log on as userA then 'su' into userB and i cd into /home/userB/testdata.
I didnt realise that i was userB so i issued the command
And suddenly i see this
bash-3.00$ rm $XMLFILES/* rm: /bin not removed: Permission denied rm: /boot is a directory rm: /cdrom is a directory rm: /dev is a directory rm: /devices is a directory rm: /etc is a directory rm: /export is a directory rm: /home is a directory rm: /kernel is a directory rm: /lib is a directory rm: /lost+found is a directory rm: /mnt is a directory rm: /net is a directory rm: /noffprotect: override protection 644 (yes/no)? ^C
I pressed [CTRL+C] as soon as i saw that override protection message. I think since $XMLFILES was null because i was logged on as userB the command that was issued was actually
Now what i dont understand is why did it try tro delete everything from the root folder? since i was in /home/userB, should it have just tried to delete everything in 'top level of '/home/userB'? the rm command was not even a recursive delete.
Given that the user i was logged on as was not the root user, would this have caused any damage?