Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creation of /etc/nologin by another user

Status
Not open for further replies.

macrun95

Technical User
Dec 5, 2005
28
US
Is there a way to allow another user to create the /etc/nologin file? I need to allow a user to create the nologin but don't want to give them root. I can do it via sudo but would rather they be able to create it from the command line.

Thanks
 
I guess sudoing "touch /etc/nologin" for this user would do the job.
 
How about creating a small script run under root permission (SUID) that creates the nologin?

Regards,
Khalid
 
You can't suid a script (at least last time I checked). You'd need a C-compiled wrapper-program for it. Might as well use sudo then...


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top