• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Script to change User to root

 
Abiodun Adisa
Ranch Hand
Posts: 495
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to write a script called say test.sh that when i execute it it would change the user logged in to root
Please how do i accomplish this
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More likely you just want to change the effective user ID. The "su" and "sudo" commands do that.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using sudo is much less of a security hole than setting to root. You really should lookup and use sudo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic