Review your favorite Linux distribution.
Go Back > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.


  Search this Thread
Old 03-10-2004, 11:45 PM   #1
LQ Newbie
Registered: Mar 2004
Distribution: Solaris 9
Posts: 2

Rep: Reputation: 0
changing permissions and the UID...

I am tying to make it so that the user has access to ping, since right now only root has access to that. How do you use chmod to change the UID? since I believe this is what needs to be set. Thanks in advance for any replies.
Old 03-11-2004, 01:13 AM   #2
Senior Member
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
you probably want to do a chmod 755 ping. To actually change the uid (aka the owner of the file) you would use chown user:group file
Old 03-11-2004, 10:14 AM   #3
LQ Newbie
Registered: Mar 2004
Distribution: Solaris 9
Posts: 2

Original Poster
Rep: Reputation: 0
I've tried both "chmod 755 ping" and chown to make root the owner of the file, but I still can't get this to work. Any other suggestions? Thanks for the last one by the way.
Old 03-11-2004, 10:47 AM   #4
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Solaris, Ubuntu, SUSE
Posts: 282

Rep: Reputation: 45
Its nothing to do with the permissions on the file. They should be set with

-r-sr-xr-x root:bin ping

The problem is that ping is in the /usr/sbin directory. The sbin directory is not normally in normal users path. If you want to use ping you could either
1 add /usr/sbin to the users path either locally or system wide or
2 - copy the sbin binary into normal bin directory (/usr/bin)
3 - just use /usr/sbin/ping

The ping command runs as root (hence the UID set) but should have execute permissions for anyone. Changing the permissions on the file will lead to ping not having the correct permissions to run and probably will not work.
The binaries located in /usr/sbin (normally /sbin) are special because
1 they are there fore system recover (i.e single user mode)
2 They have all the special library functions contained in the binary so no external libraries are needed (which would normally be available in multi user mode (all the file systems mounted).


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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 09:05 PM
changing UID of a user to "0" paeng16 Linux - Security 5 06-17-2004 12:31 AM
changing uid, gid zeke1955 Linux - General 4 01-10-2004 12:53 AM
changing permissions... ashesh Linux - General 3 08-16-2003 12:32 AM
Changing User IDs (UID) totalcommand Linux - Newbie 5 06-06-2003 07:47 PM > Forums > Other *NIX Forums > Solaris / OpenSolaris

All times are GMT -5. The time now is 11:21 AM.

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