Visit Our UNIX and Linux User Community

Solaris 10 - 'ls' green for root user only

Thread Tools Search this Thread
Operating Systems Solaris Solaris 10 - 'ls' green for root user only
# 1  
Old 12-27-2014
Solaris 10 - 'ls' green for root user only

Welcome to all.

Have an issue and looking for help so hope someone is able to give me some clues.

I prepared some shell scripts with coloured output to help other guys to have more automated task. Not sure if I did this but now whenever I use 'ls' command for root user every output in terminal stays green. I can of course give 'tput sgr0' and make it black again but it will come back once 'ls' command is used. This happens only for root user. I checked env variables (TERM=vt100) to see if there is something in there - nothing. I compared them with users vars - nothing. I checked .profile and .bashrc of root user - nothing. There is nothing in aliases as well. Only 'ls -F' and looks like ls does not support --color option.

Anything else can I check?
# 2  
Old 12-27-2014
The most likely reason is your customized "ls" fails to revert the rendition to normal.

What says "type ls" ?
# 3  
Old 12-27-2014
I will check and post output on Tuesday cos do not have remote access. Thanks for feedback. I just installed solaris 10 on my virtual machine at home so will have comparison. If i am not mistaken I tested that with: 'which ls' and output was: '/usr/bin/ls'.
# 4  
Old 12-27-2014
Is that "always green" background or foreground? Does it depend on the last file listed? Or on your application's exit? Please post the output of ls -la | od.
# 5  
Old 12-27-2014
What's the output from 'alias'?
# 6  
Old 12-27-2014
Originally Posted by TiedCone
If i am not mistaken I tested that with: 'which ls' and output was: '/usr/bin/ls'.
The "which" command is useless. It only looks to the PATH so doesn't take into account aliases, builtins or functions. It won't help figuring out what is actually executed when you type a command.
The portable way is "type command".
# 7  
Old 12-27-2014
Ok then. Like I said, on Tue I will answer all question.

Originally Posted by RudiC
Is that "always green" background or foreground? Does it depend on the last file listed? Or on your application's exit? Please post the output of ls -la | od.
Only fg (text) is green, even along with the shell prompt after 'ls' is used. It does not depend on last files listed. It happens right after the first use of 'ls'.

Originally Posted by achenle
What's the output from 'alias'?
If not mistaken only 2 aliases are there:
ll='ls -la'
ls='ls -F'

I checked that while searching to solve this issue.

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Solaris

Root user not recognizing on Solaris-10 (shadow file corruption)

Hello, I got into a wired state on one of solaris 10 server. When I noticed that server is having some issue, I found that there were dumpadm.conf entries in /etc/shadow and real entries were wiped of. Probably somebody fat fingers. I was able to boot into failsafe, break SVM mirror, copied... (25 Replies)
Discussion started by: solaris_1977
25 Replies

2. SuSE

Non root user want to see /var/log/messages - any suse equivalent of Solaris dmesg

Hi New to Suse - mainly used Solaris. In solaris dmesg will also show you contents of messages log file but in Suse Liux it doesnt appear to. I dont have root access to this Suse server, and wondering is there any other tool / utility that allows me to see the messages file contents like on... (1 Reply)
Discussion started by: frustrated1
1 Replies

3. UNIX for Dummies Questions & Answers

Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread. I can't really find the solution to my (simple) problem. Here's what I'm trying to achieve: As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user. The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies

4. Solaris

Enable FTP for root user in Solaris 10

I am not able to get ftp working for Solaris 10 for root user. I am getting login failed error. 331 Password required for root. Password: 530 Login incorrect. Login failed. Tried following things already. 1. SFTP works ok, still would like to know why FTP is not working (curious). 2.... (5 Replies)
Discussion started by: webkid
5 Replies

5. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

6. Solaris

Non-root user access to privileged ports-Solaris 8

Please let me know how to setup a non-root user to be able to access a privileged port (<1024) on Solaris 8. I am currently running tomcat as "tomcat" user and I get the following error during to start up: SEVERE: Error initializing endpoint Permission denied<null>:443 (5 Replies)
Discussion started by: pingmeback
5 Replies

7. Solaris

How to start CDE for non root user on Solaris 10

Hi, How can I start CDE for non root user created.For root CDE is working fine but for non root user CDE exits back to login screen after trying for some time.Also I cant see .dt and .dtprofile files in the users home directory.How can I create them.Kindly help. Thanks & Regards, Kiran. (1 Reply)
Discussion started by: kiranherekar
1 Replies

8. Solaris

Permissions for the root user on Solaris 10

Hi I have a doubt, here if a file does not have the write permissions to the root user my script is going to write the data into that file. when i executed the script as root user. Is it correct ... ? (4 Replies)
Discussion started by: Shreedhar Naik
4 Replies

Featured Tech Videos