06-04-2008
You can try using sudo with the eject command , without password.sudo works like a charm!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
hi,
my problem is that i am calling a script from my perl program.
the script checks wether a particular process is running or not if the process is not running then it should start the process.
the problem here is that the front end logs into backend with a user which does not have the... (0 Replies)
Discussion started by: raviraushanjha
0 Replies
2. Shell Programming and Scripting
Good day Guys!!!
I am currently making a script in AIX, the script runs a SAS job, the owner of the script is the root, but the SAS jobs cannot be run by the root, as it should be run by a user 'sasia'. But inside the script, root creates a logfile, so what I need is just to su to sasia for the... (3 Replies)
Discussion started by: sasia
3 Replies
3. AIX
I'm trying to give a non-root user the right to start IBM HTTP Server, the web server is listening on port 80, but for AIX, ports under 1024 are privilege ports which can be used only by root.
/usr/IBMIHS/bin# ./apachectl start
(13)Permission denied: make_sock: could not bind to address :::80... (1 Reply)
Discussion started by: ibmer414
1 Replies
4. Solaris
Hi Friends,
I am new to Sun solaris unix.I am facing problem while runing my kornshell script just as an ordinary user.The script works fine while i am working as a super user.the script just uses awk to check the first charcter of a file and then copies the file to another folder. Do i... (4 Replies)
Discussion started by: gjithin
4 Replies
5. Shell Programming and Scripting
hi friends,
I am a new Sun Solaris 10 user. I have the following script
line=$(awk '{if(substr($0,1,1)!="#" &&
substr($0,1,1)!=";" &&
substr($0,1,1)!=" " &&
substr($0,1,1)!="/" &&
substr($0,1,1)!="*" &&
substr($0,1,1)!="\\" &&
length($0)!=0)
... (10 Replies)
Discussion started by: gjithin
10 Replies
6. Linux
Hi,
Is it possible to grant root privileges to an ordinary user?
Other than 'sudo', is there some way under Users/Groups configuration?
I want ordinary user to be able to mount, umount and use command mt.
/Brendan (4 Replies)
Discussion started by: brendan76
4 Replies
7. UNIX for Dummies Questions & Answers
How to give an ordinary user the superuser (root) ID which is 0 (9 Replies)
Discussion started by: sharaola
9 Replies
8. Shell Programming and Scripting
Hi All
I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh
URL="www.google.com"
VBURL="10.5.2.211"
echo "Setting route for $URL for GPRS"
URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1`
echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies
9. Shell Programming and Scripting
Hi Experts,
I had tried to executes this script to change the user password through script:
No lines in buffer
#!/bin/ksh
cat /etc/passwd | grep -v userid >> /tmp/pass.tmp1
cat /etc/passwd | grep userid >> /tmp/pass.tmp2
PASS1=`cat /tmp/pass.tmp2 | cut -d ":" -f2`
PASS2=`q2w3e4r5`
sed... (3 Replies)
Discussion started by: indrajit_renu
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I want to change the password of unix users on a number of servers.My plan was to ssh to all the servers in a shell script and use the passwd command. I tried to do so but everytime i run it i get this error.
ssh -x -n -l user1 host passwd
Changing password for "user1"
3004-709 Error... (3 Replies)
Discussion started by: poojabhat
3 Replies
EJECT(1) BSD General Commands Manual EJECT(1)
NAME
eject -- eject a floppy disk, cdrom or tape
SYNOPSIS
eject [-fv] [-l | -L | -U] [-t device-type] [-d] device
eject -n
DESCRIPTION
The eject program ejects a medium from the specified device. It can also load a cdrom in the drive if this operation is supported by the
hardware. The device argument specifies a device either by its full path name (identified by a /dev/ prefix), or by one of the built-in
nicknames. If the medium contains a file system that is currently mounted, eject will attempt to unmount the file system before ejecting.
The following options are available:
-d Deprecated.
-f Force the eject operation without attempting to unmount any file systems first.
-l Load media in the drive (only supported for the cdrom device type).
-L Lock the media into the drive (but see BUGS below).
-n List the built-in nicknames on standard output.
-t device-type
Specify the device type. The argument must be one of diskette, floppy, cdrom, disk, or tape. This option is necessary when ejecting a
device for which no built-in knowledge is available.
-U Unlock the media from the drive.
-v Display some of the actions taken on standard output.
BUGS
Most disk drivers automatically lock the media on the first open and unlock it on the last close, making 'eject -L' almost useless, since
when it closes the device, it gets unlocked again.
BSD
October 6, 2001 BSD