LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-17-2008, 08:42 PM   #1
polemon
Member
 
Registered: Jun 2005
Distribution: Fedora 18, Ubuntu 11.10, Ubuntu Server 11.10, DamnSmallLinux 3.4.4, FreeDOS 1.1, OpenBSD 5.0
Posts: 194

Rep: Reputation: 31
zsh: Safe enough for root?


Hi!

I use zsh as my shell as user.

Now I was wondering, if it is safe to make zsh my root shell.
/usr is mounted on my root partition, so it's always available, even if I need to boot into single user mode.

Should I leave my root shell bash, or can I safely switch that to zsh?

--polemon
 
Old 05-18-2008, 08:13 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,561
Blog Entries: 54

Rep: Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927Reputation: 2927
If you want to know if it's safe in terms of security risks you can get some idea from Zsh changelog or the CAN-CVE: Z-shell (no version tag): 12 hits. Last is CVE-2007-6209. GNU Bourne-Again SHell (no version tag): 4 hits. Last one is CVE-2000-1134. Or Secunia.com: Zsh (v4): 1 advisory in 2007. Bash (v3): none. Bash (v2): not listed. If you want to know if it's safe in terms of shell compatibility, Zsh seems Sh (Bourne) and Korn Shell compatible (Zsh FAQ) (also see Wikipedia shell comparison and compare to Bourne-Again SHell).

From a traditional (system-centric, architectural, rigid) point of view the root account is not a user account, meaning it's there to sustain system functions. Obviously the only task of the system is to keep the system alive ; -p so anything that potentially damages the system in terms of reliability, stability, continuity should be avoided. Your /usr being part of / is a good point, but from a "best practices" point of view I would suggest leaving the root shell alone. You shouldn't be using the root shell for script developing anyway. While the Zsh site provides coverage for converting from Bash to Zsh, still changing the root account shell to Zsh would mean you would have to review every script (from initscripts to cronjobs to custom scripts) that is executed by root for potential breakage.

Finally, I wouldn't use Zsh for root-executed scripts for fear of getting addicted to Zsh-isms (says someone who knows he should be scripting in Bourne Sh or Heirloom Jsh instead of Bash2). True, not much of a point if you only have to care for one system, but I've found it's a realistic hazard if you need to care for cross-platform compatibility.

Last edited by unSpawn; 05-18-2008 at 05:25 PM.
 
  


Reply

Tags
root, zsh


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
zsh as root? abrouwers Slackware 7 08-13-2005 04:14 PM
Is it safe to build LFS as a root ? dimaash Linux From Scratch 3 07-29-2005 11:59 AM
Safe to resize root partition with PM8? Ohmn Mandriva 6 07-09-2004 10:29 AM
KDE3.2 /root installation safe? pacifist248 Linux - Software 0 02-07-2004 02:55 PM
Safe from root? acid_kewpie Linux - General 6 09-27-2001 04:26 PM


All times are GMT -5. The time now is 03:09 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration