How do i change to super user then revert back to ordinary user ,using shell script?
I am trying to eject the cdrom from a livecd after certain stage...
Now assuming that it is possible to eject,please consider my issue!!!
The OS boots into a regular user by default...so i am unable to use the eject command to push out the drive...
However if i try pfexec eject it works....but then again it works only when the system is completely up and running not at some intermittent stage in the boot process.
How do i change the my id to a Superuser then execute the eject command ,then once the eject is done with, i would like to revert back to the ordinary user?
Secondly this code should be incorporated into one of the boot scripts,
So that after a certain stage during the boot, the drive automatically ejects......
How do i do it.....
PS:i urge you to consider that ejecting the media on a livecd is possible.
I understand the live-cd is copied on RAM to allow ejection when done. How would the OS survive an ejection if it is depending on the live-cd media content at an earlier stage ?
What is the issue with pfexec ? It is the preferred way to run privileged commands as a regular user under Solaris.
oh, so you want it out of me anyhow...
i have made this possible ...
The copy is done at an earlier stage itself...
Its not goin to wait till the gui is up for the copy to happen....
its now a part of the boot process ,meaning at a very primitive stage in the boot process itself the required files are copied to ram then on the cd becomes redundant....the remaining boot process including getting the gui will be done from ram
The pfexec program is used to execute commands with the
attributes specified by the user's profiles in the exec_attr file...
Could you think of a script now?
Sorry but I still don't understand where the problem lies. Do you want the cdrom to be ejected after the user logs in or before ?
What happens when you run the "eject cdrom" command ?
i want the cdrom to be ejected after all files have been copied on RAM and at the point whrer the boot process begins from ram....
I have located the scripts that run after the copy is done, and i am incorporating this script in that file...
I really dont mind if the ejection happens as soon as the copy is done or when the gui is up...I just want it to happen ,thats all.
This is what i do,
There is a momentary change in the user and then the eject happens , then i am taken back to ord user...
But if i try using this in the boot script i get no errors but still the ejection wont happen??
If its easier to perform this action once the gui is up, am ready to give that a try as well...
Could you please specify as to,howi can do it?
Why do you need to su in your copy script while I assume it already runs as root ?
Are you sure the cdrom filesystem is unmounted ? This is a mandatory prerequisite to media ejection.
vlc run problem in f10
|All times are GMT -5. The time now is 03:33 AM.|