Why user has permissions to execute 'init 0'?


 
Thread Tools Search this Thread
Operating Systems Solaris Why user has permissions to execute 'init 0'?
# 1  
Old 08-04-2010
Why user has permissions to execute 'init 0'?

Hi all.
On one workstation run Solaris 10 a simple user can to execute 'init 0' command without input (su and root password).
Example:

Code:
% init 0
%
OK

I don't understand how user can execute 'init 0' command on this workstation?

1) I checked /usr/local/etc/sudoers all lines are commented.

2) I checked RBAC.

Code:
%roles
no roles

3) init permissions
Code:
  
/sbin:
-r-sr-sr-x         1   root    sys        init

Code:
/etc:
lrwxrwxrwx  1    root     root       init -> ../sbin/init


What I must check yet?

Last edited by wolfgang; 08-04-2010 at 12:58 AM..
# 2  
Old 08-04-2010
might be because of the "s" permissions. The command, though is initiated by a regular user, is executed as root.
Try changing it to the default r-xr-xr-x root sys
# 3  
Old 08-04-2010
Is default permissions of /sbin/init -r-xr-xr-x???
# 4  
Old 08-04-2010
That's right, the defaults for /sbin/init are: User = root, Group = sys, Mode = 0555 (r-xr-xr-x).
# 5  
Old 08-04-2010
It seems, if I will change permissions /sbin/init to -r-sr-sr-x only, on any workstation.
Will any user can execute 'init 0' command?
# 6  
Old 08-04-2010
I tried on my workstation, bootadm will not execute the command unless you are the root user
# 7  
Old 08-04-2010
Quote:
Originally Posted by wolfgang
It seems, if I will change permissions /sbin/init to -r-sr-sr-x only, on any workstation.
Will any user can execute 'init 0' command?
Yes, that's the very purpose of the setuid bit on executables.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script without execute permissions will work for a user?

Please help me to understand the issue: Issue: There are shell scripts in a user home directory (/home/user_1) without execute permissions (rw-r--r--) to owner,group and world These shell scripts were able to execute/work previously but its not working now and it says permission denied or... (2 Replies)
Discussion started by: MSK_1990
2 Replies

2. AIX

what user executes init on boot?

I have a command in init that trys to start a daemon and open a log, but a get an error error that the file access permissions do not allow the specified action. My permissions on the log file are: -rw-r--r-- 1 root system 4434 Mar 22 15:13 dsmerror.log The logfile is written to... (2 Replies)
Discussion started by: pong3d
2 Replies

3. Red Hat

INIT: cannot execute "/etc/X11/prefdm"

Hi I tried the following but no joy! Inserted the linux installation cd.. ( rescue mode)... tried chroot /mnt/sysimage but I get chroot: cannot execute /bin/sh Checked the permission on /bin and it was set to ?r--rw-rx tried to do chmod –R 755 but got error operation not permitted ...... (3 Replies)
Discussion started by: halacil
3 Replies

4. UNIX for Dummies Questions & Answers

Using find to search for any owner having execute permissions.

Hi I need help. I need to use find (or grep I don't care) to recursively search for files who have any kind of executable permissions (group and/or owner and/or other). I am looking for *.c and *.h This what I am using now: find . -name *.h -perm -111 -print but I don't want to retype that... (4 Replies)
Discussion started by: dissectcode
4 Replies

5. Shell Programming and Scripting

root user command in shell script execute as normal user

Hi All I have written one shell script for GPRS route add is given below named GPRSRouteSet.sh URL="www.google.com" VBURL="10.5.2.211" echo "Setting route for $URL for GPRS" URL_Address=`nslookup $URL|grep Address:|grep -v "#"|awk -F " " '{print $2}'|head -1` echo "Executing ... (3 Replies)
Discussion started by: mnmonu
3 Replies

6. UNIX for Dummies Questions & Answers

Running file without execute permissions

Please explain this strange behavior to me bash-2.03$ ls -l abc -rw------- 1 bashboy users 319 Sep 21 18:02 abc bash-2.03$ ./abc bash: ./abc: Permission denied bash-2.03$ . abc Successfully run I wanted to ask how the file executes without the execute permissions when we... (3 Replies)
Discussion started by: rakeshou
3 Replies

7. UNIX for Dummies Questions & Answers

Default read/write/execute permissions

I am perplexed that my script execution is not always consistent in creating new files. Specifically, my group read/write/execute permissions. For instance, take a look at the following: -rw-rw---- 1 jg dp 18648 Aug 22 10:06 nx081508.txt -rw-rw---- 1 jg dp 22422 Aug 22 10:06... (1 Reply)
Discussion started by: joeyg
1 Replies

8. UNIX for Dummies Questions & Answers

help with permissions - execute but not delete

Hi, We have 2 users and one directory (dir). One user is admin user and other use r is operator user. who is responsible for just executing the scripts e.g. startWeblogic and stopWeblogic etc, we want to restrict this operator user in such a way that he can only execute these files and he should... (2 Replies)
Discussion started by: reldb
2 Replies

9. SCO

start script from - execute init 6 (not as root)

I have 2 questions : ---------------------------------- 1 - How can I execute a program when Unix Sco reboot? For example I have two script (two sockets) that I have to start from 2 different users (root and toto). I heard something about "etc/init.d" directory, but I don't know what to... (4 Replies)
Discussion started by: soshell
4 Replies
Login or Register to Ask a Question