Solaris 10 root shell change


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 10 root shell change
# 1  
Old 05-10-2006
Solaris 10 root shell change

Why does Solaris keep coming with bourne as the default root shell? I've spoken with numerous admins that tell me they change all the root shells to korn.

I would like to change all Solaris 10 boxes here at my company to have a root korn shell. Can someone tell me why I shouldn't do this?

Thanks,

-X

Last edited by x96riley3; 05-10-2006 at 05:19 PM..
# 2  
Old 05-10-2006
You should only change it to something other than the bourne shell if /usr/lib is under the root partition.
# 3  
Old 05-11-2006
It's a minor inconvenience, you just change shell after logging in.

/sbin/sh is statically linked and is the only shell that will run in single user mode with /usr on a different partition than /.
# 4  
Old 05-11-2006
Quote:
/sbin/sh is statically linked
not anymore...

with solaris 9:
Code:
root@jumpy # uname -a
SunOS jumpy 5.9 Generic_118558-11 sun4u sparc SUNW,UltraAX-i2
root@jumpy # ldd /sbin/sh
ldd: /sbin/sh: file is not a dynamic executable or shared object
root@jumpy #


and here comes 10:
Code:
root@mp-wst01 # uname -a
SunOS mp-wst01 5.10 Generic_118833-03 sun4u sparc SUNW,Sun-Blade-100
root@mp-wst01 # ldd /sbin/sh
        libgen.so.1 =>   /lib/libgen.so.1
        libsecdb.so.1 =>         /lib/libsecdb.so.1
        libc.so.1 =>     /lib/libc.so.1
        libnsl.so.1 =>   /lib/libnsl.so.1
        libcmd.so.1 =>   /lib/libcmd.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libmd5.so.1 =>   /lib/libmd5.so.1
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
        /platform/SUNW,Sun-Blade-100/lib/libmd5_psr.so.1
root@mp-wst01 #

well, looking at that, it doesn't matter if you change it in solaris 10 ;-)

regards pressy
# 5  
Old 05-11-2006
Thanks for all the feedback!!!

-X
# 6  
Old 05-11-2006
Quote:
Originally Posted by pressy
not anymore...
well, looking at that, it doesn't matter if you change it in solaris 10 ;-)
It that intentional? I would like Sun to explain what use /sbin/su.static is without a staticly linked shell. After a few customers screw up /lib we may see Sun return to a staticly linked shell. Even though Sun has withdrawn the ability to easily recover from a shared library disaster, I still would not change shells unless /usr has been merged into the root filesystem. Those other shells continue to reside in /usr. If /usr cannot be mounted, most of us would prefer a root shell that resides entirely in the root filesystem.
# 7  
Old 05-11-2006
good point, but look, nothing is static in solaris10
Code:
root@mp-wst01 # ldd /sbin/su.static
        libcmd.so.1 =>   /lib/libcmd.so.1
        libbsm.so.1 =>   /lib/libbsm.so.1
        libc.so.1 =>     /lib/libc.so.1
        libsocket.so.1 =>        /lib/libsocket.so.1
        libnsl.so.1 =>   /lib/libnsl.so.1
        libmd5.so.1 =>   /lib/libmd5.so.1
        libsecdb.so.1 =>         /lib/libsecdb.so.1
        libmp.so.2 =>    /lib/libmp.so.2
        libscf.so.1 =>   /lib/libscf.so.1
        libdoor.so.1 =>  /lib/libdoor.so.1
        libuutil.so.1 =>         /lib/libuutil.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
        /platform/SUNW,Sun-Blade-100/lib/libmd5_psr.so.1
root@mp-wst01 # ldd /sbin/mount
        libcmd.so.1 =>   /lib/libcmd.so.1
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
root@mp-wst01 # ldd /sbin/umount
        libc.so.1 =>     /lib/libc.so.1
        libm.so.2 =>     /lib/libm.so.2
        /platform/SUNW,Sun-Blade-100/lib/libc_psr.so.1
root@mp-wst01 # ls -i /sbin/sh /usr/bin/sh
 281453 /sbin/sh   281453 /usr/bin/sh
root@mp-wst01 # ls -i /lib/libc.so.1 /usr/lib/libc.so.1
 272214 /lib/libc.so.1   272214 /usr/lib/libc.so.1

it's the same binary as well. sun recommends to include the /usr in the root filesystem. Sun EIS (Enterprise Installation Standards) follows the doctrine of Adrian Cockroft in his book "Solaris Performance and Tuning" ie "all in one slice". In particular sun does not have separate slices for /usr, /opt or even /usr/openwin! There may be reasons to have /var in a separate slice on a server (such as constraining the system from filling up with historic log and message files), which i always do and recommend...

if you have an own /usr, you could copy the shell to e.g. /sbin, links go to /lib in root and not to /usr/lib, that should do the job..

but anyhow, true, there is no explanation why, in a case of emergency it would be better to have a "not linked" shell

gP
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies

2. Ubuntu

Root access that can't change root password?

We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a guarantee that we still can login to that server and become root no matter of what the other users will... (2 Replies)
Discussion started by: 244an
2 Replies

3. Shell Programming and Scripting

Need Help:Shell Script for Solaris to change the dates in a file by one week

I have to increase the date by one week in an input when script is executed in solaris. I was able to acheive this using ksh script that is working in Linux enivironment, when i execute the same script in Solaris i am getting below error: /var/tmp\n\r-> ./script.ksh date: illegal option -- d... (3 Replies)
Discussion started by: sriramanaramoju
3 Replies

4. Solaris

Can't change root password in solaris express 11

How do I change root password in SolarisExpress 11? I used passwd while elevated to root and all it changes is the password of the user I am logged in, not te root password. (2 Replies)
Discussion started by: taltamir
2 Replies

5. Solaris

Solaris 8 - Asks for current root password when trying to change root password.

Hello All, I have several solaris boxes running Solaris 8. When changing root passwords on them, all will simply ask for the new root password to change and of course to re-type the new password. One of the systems however asks for the existing root password before it will display the new password... (8 Replies)
Discussion started by: tferrazz
8 Replies

6. Solaris

root can not change the permission of old oracle archive directory in solaris 8

I am using oracle 9i with sun solaris 8 on Sun E 250 server.earlier we are taking backup of oracle archive files on /orabackup directory.in which archive file are stored with ...arc.Z extension. now we have changed the archive backup directory.now when we are trying to delete earlier directory... (3 Replies)
Discussion started by: mahanalok
3 Replies

7. Shell Programming and Scripting

how to change root password using shell script with standard password

Hi Friends. I am new to scripting now i want to change the root password using the script with standard password. which is the easy scripting to learn for the beginner, Thanks in advance. (2 Replies)
Discussion started by: kurva
2 Replies

8. UNIX for Dummies Questions & Answers

Change root prompt (Solaris)

Hello all. I was wondering if there is a way to change the root prompt. I am using Solaris 10 and would like to have the root prompt display the current directory along with 'SU' to indicate root status. What I have tried so far: /etc/passwd changed the root shell to korn with... (10 Replies)
Discussion started by: RobertSubnet
10 Replies

9. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies
Login or Register to Ask a Question