Solaris 10 - 'ls' green for root user only


 
Thread Tools Search this Thread
Operating Systems Solaris Solaris 10 - 'ls' green for root user only
# 15  
Old 12-30-2014
Code:
type ls

in root gives me
Code:
ls is aliased to ls -F

only, nothing more.
Code:
ls -l /usr/bin/l*;sum /usr/bin/ls;uname -a

gives me 18700 JUN 11 2008
Code:
grep usr/bin/ls /var/sadm/pkg/SUNWcsu/save/pspool/SUNWcsu/pkgmap | awk '{ print $8 }'

gives 18700
Code:
truss -t\!all -tstat -vstat ls /usr/bin/stat

mt = JUN 11 2008
If mt stands for modified time above shows that ls has not been modified for years.

Code:
echo $0

in root gives me /bin/bash, bash for user and pfksh for admin.

I found also that supershell process is run by /bin/ksh and I checked, I hope, all files related to ksh and nothing strange has been found.

What else is worth trying?
# 16  
Old 12-30-2014
Post the output of both
Code:
ls -d . | od -c

and
Code:
echo "$PS1" | od -c

# 17  
Old 12-30-2014
In case there is a filename in your directory that contains the color changing escape sequence, please also try:
Code:
tput sgr0;ls -l

and tell us if there is any black text before the output turns green.
# 18  
Old 12-30-2014
It has to be something related to home folder of root. I just found out that it happens only within root folder (/root). If I escape it and send 'ls' command text stays black as it should.
Image

I had one script with some color strings in /root. I removed all scripts from this folder and it still shows green text.
# 19  
Old 12-30-2014
There is a file which name contains the SGR command.

Code:
ls | od -c

This User Gave Thanks to jlliagre For This Post:
# 20  
Old 12-30-2014
Indeed there is something cos output of this command shows something like:
Code:
0000000 0 3 3   [   3 2 m   \n   D e s k t o p   /   \n

but if I try to list all files I cannot find it. How can I remove '033[32m'?
# 21  
Old 12-30-2014
Use
Code:
mv *??Desktop* brokenfile

Login or Register to Ask a Question

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 java.net.BindException: 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
Login or Register to Ask a Question