cannot su into root default shell - debianGit / Jenkins permission problemRoot password not working when...

100-doors puzzle

Numerical second order differentiation

Time at 1G acceleration to travel 100000 light years

On George Box, Galit Shmueli and the scientific method?

I have found ports on my Samsung smart tv running a display service. What can I do with it?

How useful is the GRE Exam?

How did the European Union reach the figure of 3% as a maximum allowed deficit?

Why can't we feel the Earth's revolution?

Converting 3x7 to a 1x7. Is it possible with only existing parts?

Why are almost all the people in this orchestra recording wearing headphones with one ear on and one ear off?

High-end PC graphics circa 1990?

Huge Heap Table and table compression on SQL Server 2016

How can the US president give an order to a civilian?

What do I put on my resume to make the company i'm applying to think i'm mature enough to handle a job?

Is my research statement supposed to lead to papers in top journals?

Digital signature that is only verifiable by one specific person

Is this set open or closed (or both?)

Why can't I craft scaffolding in Minecraft 1.14?

Interview was just a one hour panel. Got an offer the next day; do I accept or is this a red flag?

How to write a nice frame challenge?

Co-worker is now managing my team. Does this mean that I'm being demoted?

How do I become a better writer when I hate reading?

How can this shape perfectly cover a cube?

How to prevent cables getting intertwined



cannot su into root default shell - debian


Git / Jenkins permission problemRoot password not working when trying to updateWhat exactly differentiates the root user from every other user?How to add myself to sudoers when I have no root access on my debian machine?How to add the only user on a Debian system back into the sudo group?How can I protect my user passwords and passphrase from rootRoot user unable to see files/directoriesunable to add user to group fedora 29su: cannot open session: Permission deniedRestrict root shell access






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I am using a debian 9 server.



Usually I access via ssh to a normal user (say user1) and su into root, because I disabled ssh into root.
Lately I was setting up a git-server where I created a user git with the group git and restricted him to git-shell.
Playing around a little while a added user1 to the group git like this



usermod -aG git user1


This worked alright, user1 was member of the groups user1 and git.
At the end I wanted to undo this, so I used



usermod -G user1 user1


Shortly after this, I lost my internet connection and had to reconnect. I can ssh into user1 alright, but when using su to access root, there is an error:



user1@hostname:~$ su 
Password:
Cannot execute git: No such file or directory


I included the information about git-shell, because I have no idea what else could be the reason. Hopefully it is not all lost and somebody can help me to regain control.



PS: There isnt any other root-like user, so sudo isnt working, since user1 "is not in the sudoers file".



PPS: I could reset the root password, but I am not quite sure whether this is going to work or make everything worse...










share|improve this question









New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you try su -s /bin/sh to try to get a root shell?

    – doneal24
    49 mins ago











  • unfortunately same error...

    – Pratched
    47 mins ago













  • To work it some more, how about su -s /bin/sh -c /bin/sh? Seems like overkill but it's worth a try.

    – doneal24
    37 mins ago











  • Cannot execute git - so similar error, the "missing directory" ist not mentioned here

    – Pratched
    35 mins ago











  • would root password reset be worth a try?

    – Pratched
    34 mins ago


















0















I am using a debian 9 server.



Usually I access via ssh to a normal user (say user1) and su into root, because I disabled ssh into root.
Lately I was setting up a git-server where I created a user git with the group git and restricted him to git-shell.
Playing around a little while a added user1 to the group git like this



usermod -aG git user1


This worked alright, user1 was member of the groups user1 and git.
At the end I wanted to undo this, so I used



usermod -G user1 user1


Shortly after this, I lost my internet connection and had to reconnect. I can ssh into user1 alright, but when using su to access root, there is an error:



user1@hostname:~$ su 
Password:
Cannot execute git: No such file or directory


I included the information about git-shell, because I have no idea what else could be the reason. Hopefully it is not all lost and somebody can help me to regain control.



PS: There isnt any other root-like user, so sudo isnt working, since user1 "is not in the sudoers file".



PPS: I could reset the root password, but I am not quite sure whether this is going to work or make everything worse...










share|improve this question









New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • Can you try su -s /bin/sh to try to get a root shell?

    – doneal24
    49 mins ago











  • unfortunately same error...

    – Pratched
    47 mins ago













  • To work it some more, how about su -s /bin/sh -c /bin/sh? Seems like overkill but it's worth a try.

    – doneal24
    37 mins ago











  • Cannot execute git - so similar error, the "missing directory" ist not mentioned here

    – Pratched
    35 mins ago











  • would root password reset be worth a try?

    – Pratched
    34 mins ago














0












0








0








I am using a debian 9 server.



Usually I access via ssh to a normal user (say user1) and su into root, because I disabled ssh into root.
Lately I was setting up a git-server where I created a user git with the group git and restricted him to git-shell.
Playing around a little while a added user1 to the group git like this



usermod -aG git user1


This worked alright, user1 was member of the groups user1 and git.
At the end I wanted to undo this, so I used



usermod -G user1 user1


Shortly after this, I lost my internet connection and had to reconnect. I can ssh into user1 alright, but when using su to access root, there is an error:



user1@hostname:~$ su 
Password:
Cannot execute git: No such file or directory


I included the information about git-shell, because I have no idea what else could be the reason. Hopefully it is not all lost and somebody can help me to regain control.



PS: There isnt any other root-like user, so sudo isnt working, since user1 "is not in the sudoers file".



PPS: I could reset the root password, but I am not quite sure whether this is going to work or make everything worse...










share|improve this question









New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I am using a debian 9 server.



Usually I access via ssh to a normal user (say user1) and su into root, because I disabled ssh into root.
Lately I was setting up a git-server where I created a user git with the group git and restricted him to git-shell.
Playing around a little while a added user1 to the group git like this



usermod -aG git user1


This worked alright, user1 was member of the groups user1 and git.
At the end I wanted to undo this, so I used



usermod -G user1 user1


Shortly after this, I lost my internet connection and had to reconnect. I can ssh into user1 alright, but when using su to access root, there is an error:



user1@hostname:~$ su 
Password:
Cannot execute git: No such file or directory


I included the information about git-shell, because I have no idea what else could be the reason. Hopefully it is not all lost and somebody can help me to regain control.



PS: There isnt any other root-like user, so sudo isnt working, since user1 "is not in the sudoers file".



PPS: I could reset the root password, but I am not quite sure whether this is going to work or make everything worse...







debian root git usermod






share|improve this question









New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 37 mins ago







Pratched













New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 56 mins ago









PratchedPratched

11




11




New contributor



Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




Pratched is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • Can you try su -s /bin/sh to try to get a root shell?

    – doneal24
    49 mins ago











  • unfortunately same error...

    – Pratched
    47 mins ago













  • To work it some more, how about su -s /bin/sh -c /bin/sh? Seems like overkill but it's worth a try.

    – doneal24
    37 mins ago











  • Cannot execute git - so similar error, the "missing directory" ist not mentioned here

    – Pratched
    35 mins ago











  • would root password reset be worth a try?

    – Pratched
    34 mins ago



















  • Can you try su -s /bin/sh to try to get a root shell?

    – doneal24
    49 mins ago











  • unfortunately same error...

    – Pratched
    47 mins ago













  • To work it some more, how about su -s /bin/sh -c /bin/sh? Seems like overkill but it's worth a try.

    – doneal24
    37 mins ago











  • Cannot execute git - so similar error, the "missing directory" ist not mentioned here

    – Pratched
    35 mins ago











  • would root password reset be worth a try?

    – Pratched
    34 mins ago

















Can you try su -s /bin/sh to try to get a root shell?

– doneal24
49 mins ago





Can you try su -s /bin/sh to try to get a root shell?

– doneal24
49 mins ago













unfortunately same error...

– Pratched
47 mins ago







unfortunately same error...

– Pratched
47 mins ago















To work it some more, how about su -s /bin/sh -c /bin/sh? Seems like overkill but it's worth a try.

– doneal24
37 mins ago





To work it some more, how about su -s /bin/sh -c /bin/sh? Seems like overkill but it's worth a try.

– doneal24
37 mins ago













Cannot execute git - so similar error, the "missing directory" ist not mentioned here

– Pratched
35 mins ago





Cannot execute git - so similar error, the "missing directory" ist not mentioned here

– Pratched
35 mins ago













would root password reset be worth a try?

– Pratched
34 mins ago





would root password reset be worth a try?

– Pratched
34 mins ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Pratched is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f525051%2fcannot-su-into-root-default-shell-debian%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








Pratched is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Pratched is a new contributor. Be nice, and check out our Code of Conduct.













Pratched is a new contributor. Be nice, and check out our Code of Conduct.












Pratched is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f525051%2fcannot-su-into-root-default-shell-debian%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Hudson River Historic District Contents Geography History The district today Aesthetics Cultural...

The number designs the writing. Feandra Aversely Definition: The act of ingrafting a sprig or shoot of one...

Ayherre Geografie Demografie Externe links Navigatiemenu43° 23′ NB, 1° 15′ WL43° 23′ NB, 1°...