English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

hi

i wana to shutdown Linux os( UBUNTU specially)
it is possible to shutdown windows by creating bat file and type "shutdown -s" in it

is it possible to do such thing in Linux,
i don't wana Linux to ask for root password, because i want to use this command in my program and obviously it cant type root password !

2007-09-14 23:05:57 · 3 answers · asked by Bni 1 in Computers & Internet Software

guys shutdown command in linux is bash command, all bash command need root password !

2007-09-15 01:46:18 · update #1

3 answers

You could put the user that will run the program into the sudo list.

Or give the program suid so that it runs as root and has all of roots privileges.

2007-09-15 05:42:08 · answer #1 · answered by Gandalf Parker 7 · 0 0

To the best of my knowledge, no Linux asks for any password when shutting down.

If you shut down Ubuntu normally, it displays every command used during the process. These same commands can be used in many programming languages.

See the link below:

2007-09-15 06:18:09 · answer #2 · answered by ELfaGeek 7 · 0 0

From what I have seen done, depends on the version and a you'll need to compile some bash commands. see the sources below.

2007-09-15 06:20:56 · answer #3 · answered by Jim D 2 · 0 0

fedest.com, questions and answers