Results 1 to 9 of 9
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
06-03-2018 #1
- Join Date
- Jul 2016
- Location
- Shanghai
- Posts
- 86
How to avoid inputing sudo -i every time during login SUSE 11 or 12
Need your help.
I need to manage SUSE 11 or SUSE 12 servers everyday. But I find it is very boring when input sudo -i in every time during login SUSE 11 or 12 servers.
For example:
bsa3665:~> cat /etc/issue
Welcome to SUSE Linux Enterprise Server 11 SP3 (x86_64) - Kernel \r (\l).
bsa3665:~> sudo -i
bsa3665:~ # id
uid=0(root) gid=0(root) groups=0(root),112(sfcb)
Is there any good idea for avoid inputting the command every time?
-
06-03-2018 #2
Sure.
Use ansible/chef/puppet to manage your servers and git to keep your configuration outside of the servers.
This way there is less need to login via ssh.You must always face the curtain with a bow.
-
06-04-2018 #3
- Join Date
- Dec 2013
- Posts
- 2,747
it's a feature, not a bug.
security.
also you don't need to be root all the time; you should actually make it a habit to NOT be root when it isn't required.
-
06-05-2018 #4
- Join Date
- Dec 2017
- Location
- Argentina
- Posts
- 271
If you are careful and can review all the code you run on your machine there is no problem to run everything as root.
Although in theory you should review all the code you run anyways, since your home folder could still be affected even if you don't run anything as root.
How is your sudoers file configured? Regardless of that, you could add this to /etc/sudoers (by running visudo as root):
Code:ALL=(ALL) NOPASSWD: ALL
Code:sudo -i
-
06-05-2018 #5
- Join Date
- Jul 2016
- Posts
- 443
so since your paying for suse enterprise, did you call suse support?
bsa3665:~> sudo -i
bsa3665:~ # id
uid=0(root) gid=0(root) groups=0(root),112(sfcb)
Is there any good idea for avoid inputting the command every time?
-
06-17-2018 #6
- Join Date
- Jul 2016
- Location
- Shanghai
- Posts
- 86
-
06-17-2018 #7
Using automation and versioncontrol for server management is not my idea.
It is industry standard for at least a decade.You must always face the curtain with a bow.
-
06-17-2018 #8
- Join Date
- Jul 2016
- Posts
- 443
so you dont have permission to do things, and your fix for that is to automatically log in as root? are you not keeping up with what your doing, since by logging in as root you can DO WHATEVER YOU WANT?
pay attention: logging in as root or sudoing to a root level user is PLAIN STUPID, and shouldnt be done, ever, unless you absolutely need to. And 99% of the time, you DO NOT need to. Irithori is totally correct. ignore what CarterCock says, because if you do more than five mins of easy research you can go to google and see pretty much every *nix admin going back decades, telling people not to do this because its stupid on a galactic level.
-
07-01-2018 #9
- Join Date
- Jul 2016
- Location
- Shanghai
- Posts
- 86
Hi CarterCox,
Thank you for your reply.
Recently the issue is fixed. After asking from one of my colleague, we add a txt file in below:
-------------------------------------------->
c5259479@bsa3665:~> cat .profile
sudo -i
gmp_info
c5259479@bsa3665:~>
c5259479@bsa3665:~> id
uid=15259479(c5259479) gid=58000(ADSUSER) groups=58000(ADSUSER),58008(OS_MASTER_ASH),58010(C AM_OS_CIM_ALL),58018(OS_MASTER_ROT6),58026(OS_MAST ER_ALL),58027(CAM_OS_CIM_BIT)
Then when I login any server in this network, I don't need to input sudo -i now.
But we don't know the reason.
-
07-01-2018 #10
- Join Date
- Jul 2016
- Location
- Shanghai
- Posts
- 86
Hi CarterCox,
Thank you for your reply.
Recently the issue is fixed. After asking from one of my colleague, we add a txt file in below:
-------------------------------------------->
c5259479@bsa3665:~> cat .profile
sudo -i
gmp_info
c5259479@bsa3665:~> id
uid=15259479(c5259479) gid=58000(ADSUSER) groups=58000(ADSUSER),58008(OS_MASTER_ASH),58010(C AM_OS_CIM_ALL),58018(OS_MASTER_ROT6),58026(OS_MAST ER_ALL),58027(CAM_OS_CIM_BIT)