Link to home
Start Free TrialLog in
Avatar of anwar12
anwar12

asked on

stupid question :)

i am using redhat 6.0
my questions is:
1. how to set the time in COMMAND line??
2. how to cancel the shutdown operation?
   i have tried shutdown -c but cannot because i got no prompt to type the command.
3. i read from books that we can shutdown the linux box by using this command:
  shutdown +1
but when i tried, it cannot. So i tried:
    shutdown +1 -h
but it can  make it.

i need brief EXPLANATION on question 2 and 3.

thanks
Avatar of jlevie
jlevie

1) See "man date" for setting the clock.

2) Whether or not you can interrupt the shutdown depends on how far shutdown has gone. If it hasn't actually done anything, killing the shutdown process will suffice. You can find the PID by "ps -ef | grep shutdown | grep -v grep" and then "kill shtudownon-PID". If shutdown has actaully started to shut down the system you can't safely interrupt it.

3) See "man shutdown" for a more detailed explanation of the arguments. Basically "shutdown +1" doesn't work because you've not told shutdown what to do, only when.
Opps, I just now noticed that you are trying to stop shutdown from the terminal that invoked it. In that you can abort it with Ctrl-C.
i hope u can do a shutdown if u r a root only by default. else if u have permissions "shutdown -h now" will do.

as said above u can use ctrl-c to cancel any command if it hasnt taken effect immediately.

Avatar of anwar12

ASKER

but why in my book about redhat linux administrator's handbook set by Mohammed J. Kabir said i can use "shutdown -c" command??and also it is said that i can use only "shutdown +1" command.

About what jlevie said that killing the process. How can i kill?? i even got no prompt after i enter this command.

shutdown -h +3

about using the ctrl c surely can be done.

And another thing when i use X-chat(0.9.4) i cannot connect to the server. it appears messages like this:

*** Looking up irc.efnet.net..
*** Connecting to irc.efnet.net (199.3.235.130) port 6667..
*** Connected. Now logging in..
*** AUTH :*** Looking up your hostname...
*** AUTH :*** Checking Ident
*** AUTH :*** Found your hostname
*** AUTH :*** Got Ident response
*** Closing Link: 203.106.124.152 (You are not authorized to use this server)
*** Disconnected.
*** Looking up irc.ais.net..
*** Connecting to irc-w1.concentric.net (199.2.32.11) port 6667..
*** Connected. Now logging in..
*** Closing Link: wiranto1[root@203.106.124.152] irc.concentric.net (No authorization: -2)
*** Disconnected.
*** Looking up sprynet.us.galaxynet.org..
*** Connecting to freei.us.galaxynet.org (216.225.7.158) port 6667..
*** Connected. Now logging in..
*** AUTH :*** Looking up your hostname
*** AUTH :*** Checking for ident server
*** AUTH :*** Checking for open SOCKS server
*** AUTH :*** Found your hostname
*** AUTH :*** No SOCKS server found
*** AUTH :*** Received identification response
*** Welcome to the Internet Relay Network wiranto1
*** Your host is freei.us.galaxynet.org[galaxynet.freei.net], running version glx2.0.1.(mquit)
*** This server was created Sun Apr 30 2000 at 18:56:18 PDT
*** freei.us.galaxynet.org glx2.0.1.(mquit) dioswkg biklmnopstv
*** There are 3760 users and 3261 invisible on 30 servers
*** 42 :operator(s) online
*** 1 :unknown connection(s)
*** 6279 :channels formed
*** I have 258 clients and 13 servers
-freei.us.galaxynet.org- Highest connection count: 453 (440 clients)
*** MOTD File is missing
-freei.us.galaxynet.org- on 1 ca 1(2) ft 10(10) tr
*** jakarta :No such channel


see... when i connect to efnet it's said that i am not authorized to use this server, when i connect to galaxynet i cannot join any server. when i connect to dalnet i have been autokilled. but when i use windows i can connect to that server.

so any suggestion for me to solve this problem??

thanks alot
i hope u r taking the question i sleading to some other thing than the one asked previously. u can kill the shutdown with control-c

i fu want to experiment. open another window do a ps -ef|grep shutdown and use the kill command to kill it.
else if u want to use the same window send the shutdown process to background ie by doing ctrl-z and then do the ps......... stuff to kill it.

caution: all this works only if the system hasnt started shutting down.

regarding the book u referred i dont have any idea.


regarding chat client: i hope there will be many users. so it happens sometimes with dalnet. otehr nets i dont have any idea. u can try undernet.
try connecting after it kicks u out. u may succeed
"shutdown -c" is intended for use when a shutdown has been scheduled for some point in the future and is either running as a background task or from another terminal. You can accomplish the same thing by fing the PID of the shutdown process and killing that process. "shutdown -c" is just a bit easier to remember.

When you invoke "shutdown -h +60" at the console of course you don't get a prompt back since the shutdown process is running at that terminal. If you do "shutdown -h +60 &", it will run as a background task and you'll get your prompt back. In that case you'd want to use "shutdown -c" (or kill by the PID) to abort the shutdown.

As to the IRC problem... The first server checks your hostname and gets your login ID via ident:

*** AUTH :*** Looking up your hostname..
*** AUTH :*** Checking Ident
*** AUTH :*** Found your hostname
*** AUTH :*** Got Ident response

and decides that the hostname and/or login ID aren't on its list of authorized users. And it tells you so with:

*** Closing Link: 203.106.124.152 (You are not authorized to use this server)

You say that it works from your windows box. Are you using the same login name on Linux that you use on windows? If the IRC server is trully paranoid the hostname of the Linux box would need to be the same as that of the windows box, or you'd need to register the Linux box's hostname with the server.
Avatar of anwar12

ASKER

about the shutdown u absolutely correct
really great :)
thanks
about the irc, how to solve it jlevie??
should i change the host name of my linux box???
if i should, how to change it??
i don't think i just simply change it in the /etc/passwd file, isn't it??
Which is different between windows and Linux? The hostname, the username or both? Is this a dual-boot system running windows & RH, or is the windows box a completely different machine?
Avatar of anwar12

ASKER

windows and RH running on the same machine. and i am using same login name to the internet.
ASKER CERTIFIED SOLUTION
Avatar of jlevie
jlevie

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anwar12

ASKER

Comment accepted as answer
Avatar of anwar12

ASKER

thanks for the answer jlevie...
and thanks for the comment given.