Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If I want the root user can only login at the console , can't login at workstation , that mean the root can't login via telnet , rsh , ftp ... , what can I do ? thx
I think /etc/securetty is the file you need. Following is the extact from that file:
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
Checkout the man pages for securetty and login. However, this will not prevent "su" from giving out rootshells (after authetication ofcourse!!). If you want to prevent normal users from using "su", then I think the solutions to the problem vary. I use Gentoo and I have to add the normal user to group wheel for letting him use "su".
Hope this helps.
I think /etc/securetty is the file you need. Following is the extact from that file:
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
Checkout the man pages for securetty and login. However, this will not prevent "su" from giving out rootshells (after authetication ofcourse!!). If you want to prevent normal users from using "su", then I think the solutions to the problem vary. I use Gentoo and I have to add the normal user to group wheel for letting him use "su".
Hope this helps.
cheers,
--cyberjun
thx reply ,
my /etc/securetty has many lines as below, if I want to only let root user login at console , do I need to erase all lines excetp tty1 ? thx
Hi,
Yes I think that should be it. Maybe you can keep tty1 through tty6 and comment out the rest. You should try this only while keeping atleast one root session open otherwise you might end up accidentally locking yourself out.
Try and let me know.
Originally posted by cyberjun Hi,
Yes I think that should be it. Maybe you can keep tty1 through tty6 and comment out the rest. You should try this only while keeping atleast one root session open otherwise you might end up accidentally locking yourself out.
Try and let me know.
I think /etc/securetty is the file you need. Following is the extact from that file:
# /etc/securetty: list of terminals on which root is allowed to login.
# See securetty(5) and login(1).
Checkout the man pages for securetty and login. However, this will not prevent "su" from giving out rootshells (after authetication ofcourse!!). If you want to prevent normal users from using "su", then I think the solutions to the problem vary. I use Gentoo and I have to add the normal user to group wheel for letting him use "su".
Hope this helps.
cheers,
--cyberjun
the reply , if I hv add the user to the wheel group , but still can't su to the root , could suggest what is the reason ? thx
what is ur distro? as I said, might depend on the distro you are using. I use Gentoo and for me its the wheel group. I can't tell which group will be the correct one for you?
Originally posted by cyberjun what is ur distro? as I said, might depend on the distro you are using. I use Gentoo and for me its the wheel group. I can't tell which group will be the correct one for you?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.