Solved

stupid question :)

Posted on 2000-05-12
12
327 Views
Last Modified: 2010-04-20
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
0
Comment
Question by:anwar12
  • 5
  • 5
  • 2
12 Comments
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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.
0
 

Expert Comment

by:sreeramkr
Comment Utility
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.

0
 
LVL 1

Author Comment

by:anwar12
Comment Utility
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
0
 

Expert Comment

by:sreeramkr
Comment Utility
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
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
"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.
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 1

Author Comment

by:anwar12
Comment Utility
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??
0
 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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?
0
 
LVL 1

Author Comment

by:anwar12
Comment Utility
windows and RH running on the same machine. and i am using same login name to the internet.
0
 
LVL 40

Accepted Solution

by:
jlevie earned 200 total points
Comment Utility
Is the hostname the same when running Linux? If not you'll need to change it to be the hostname of the Windows setup. It's easiest to change in linuxconf. Go to "Config>Networking>Client tasks>Basic host information". The name show on that pane should be localhost.localdomain. Select "Adapter 1" and set "Primary name + domain" to be the hostname of the windows installation.
0
 
LVL 1

Author Comment

by:anwar12
Comment Utility
Comment accepted as answer
0
 
LVL 1

Author Comment

by:anwar12
Comment Utility
thanks for the answer jlevie...
and thanks for the comment given.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

After running Ubuntu some time, you will be asked to download updates for fixing bugs and security updates. All the packages you download replace the previous ones, except for the kernel, also called "linux-image". This is due to the fact that w…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now