LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 03-10-2004, 10:45 PM   #1
viper91681
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, 12:13 AM   #2
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 66
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, 09:14 AM   #3
viper91681
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, 09:47 AM   #4
FragInHell
Member
 
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Ubuntu
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).
 
  


Reply


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 08:05 PM
changing UID of a user to "0" paeng16 Linux - Security 5 06-16-2004 11:31 PM
changing uid, gid zeke1955 Linux - General 4 01-09-2004 11:53 PM
changing permissions... ashesh Linux - General 3 08-15-2003 11:32 PM
Changing User IDs (UID) totalcommand Linux - Newbie 5 06-06-2003 06:47 PM


All times are GMT -5. The time now is 01:17 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