Solved

stupid question :)

Posted on 2000-05-12
12
329 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
ID: 2804254
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
ID: 2804264
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
ID: 2805285
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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 1

Author Comment

by:anwar12
ID: 2805584
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
ID: 2805630
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
ID: 2806953
"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
 
LVL 1

Author Comment

by:anwar12
ID: 2813825
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
ID: 2842770
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
ID: 2857110
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
ID: 2882256
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
ID: 2897461
Comment accepted as answer
0
 
LVL 1

Author Comment

by:anwar12
ID: 2897462
thanks for the answer jlevie...
and thanks for the comment given.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 61
Weird Samba Connectivity Issue... 7 40
video edge NVR Device Discovery Problem 4 47
Penetration Testing home based work 3 75
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Fine Tune your automatic Updates for Ubuntu / Debian
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

823 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