1850938 Members
2259 Online
104056 Solutions
New Discussion

Re: umount cdrom

 
SOLVED
Go to solution
YOGI_3
Frequent Advisor

umount cdrom

Hello all..
I am using Linux...
I am not able to unmount /dev/mnt/cdrom by normal user.
I am able to do this by root user.
How can i umount cdrom through normal user.

Thanks,
Yogeshg
There is never a wrong time to do the right things
5 REPLIES 5
Robert-Jan Goossens
Honored Contributor
Solution

Re: umount cdrom

Hi,

Install and configure a tool like sudo for linux.

http://www.linuxhelp.net/guides/sudo/

Best regards,
Robert-Jan
Muthukumar_5
Honored Contributor

Re: umount cdrom

umount can be executed only by root user (super user). You have to set up sudo or expert scripting to give executable permission for umount command.

Make a script like,

#!/bin/ksh
# unmount
sudo umount /dev/mnt/cdrom
#

Give the permission to normal users.
$ unmount
will umount cdrom

hth.
Easy to suggest when don't know about the problem!
YOGI_3
Frequent Advisor

Re: umount cdrom

is there any other way than SUDO
There is never a wrong time to do the right things
Muthukumar_5
Honored Contributor

Re: umount cdrom

One more simple but not secured one.

#!/bin/ksh
#unmount
(
echo "root"
sleep 2
echo "passwd of root account"
sleep 2
echo "umount /dev/mnt/cdrom"
sleep 1
echo "exit 0"
) | telnet localhost
#

Save this file in /usr/bin/ location with 555 permission using bin:bin user:group. setting.

PS: root password will be readable to normal user. You can use expect scripting to make encrypted passwd setting.

Setuping sudo is best.


Easy to suggest when don't know about the problem!
Piergiacomo Perini
Trusted Contributor

Re: umount cdrom

Hi Yogeshg,

without sudo maybe you can
test using sticky bit on the
first script that Muthukumar
suggest.
(i don't know if can be hard change)

regards
pg