Menu

#4747 Unable to rename system user

1.791
closed-fixed
nobody
None
8
2018-10-23
2016-05-09
mbnoimi
No

Whenever I try to rename system user I get this error message:

Failed to save user : Failed to replace /etc/passwd with /etc/passwd.webmintmp.13014 : Operation not permitted
  • Webmin 1.791
  • Ubuntu Linux 14.04.4
  • Linux 3.13.0-85-generic on x86_64

Discussion

  • mbnoimi

    mbnoimi - 2016-05-09

    After getting this error message the affected user disappered!!!

     
  • Jamie Cameron

    Jamie Cameron - 2016-05-10

    Which specific user did you try to rename?

     
    • mbnoimi

      mbnoimi - 2016-05-10

      admin

       
  • Jamie Cameron

    Jamie Cameron - 2016-05-11

    Is admin user equivalent to root?

     
    • mbnoimi

      mbnoimi - 2016-05-12

      Yes

       
  • Jamie Cameron

    Jamie Cameron - 2016-05-13

    Ok, I wouldn't expect this to work then - because during the rename, you are temporarily deleting the user Webmin runs as!

     
  • mbnoimi

    mbnoimi - 2016-05-13

    OMG, I'm unable to create any system user!

    Failed to save user : Failed to replace /etc/passwd with /etc/passwd.webmintmp.16547 : Operation not permitted
    
     

    Last edit: mbnoimi 2016-05-13
  • Jamie Cameron

    Jamie Cameron - 2016-05-14

    Are you sure you're running Webmin as the root user?

     
    • mbnoimi

      mbnoimi - 2016-05-14

      Sure

       
  • Jamie Cameron

    Jamie Cameron - 2016-05-14

    Are you sure /etc/passwd doesn't have some Linux filesystem attributes set that prevent it from being modified?

     
    • mbnoimi

      mbnoimi - 2016-05-15

      I'm unable to edit it using webmin althouhg I loggin to webmin using root user!

       
    • mbnoimi

      mbnoimi - 2016-05-15

      I've same problem with groups too :(

      Failed to save group : Failed to replace /etc/group with /etc/group.webmintmp.21011 : Operation not permitted
      
       
    • mbnoimi

      mbnoimi - 2016-05-15

      All the configs may you need (if you want I can send the text one :))

       
  • Jamie Cameron

    Jamie Cameron - 2016-05-15

    If you go to the Command Shell module (under the Others category) and run id -a , what does it output?

     
  • mbnoimi

    mbnoimi - 2016-05-15
    > id -a 
    uid=0(root) gid=0(root) groups=0(root)
    
     
  • Jamie Cameron

    Jamie Cameron - 2016-05-16

    Ok, so you are definitely running as root.

    What output do you get from the command lsattr /etc/passwd

     
    • mbnoimi

      mbnoimi - 2016-05-16
      ----i----------- /etc/passwd
      
       
  • Jamie Cameron

    Jamie Cameron - 2016-05-17

    Ok, there's your problem - it has the immutable bit set. You can remove this by running chattr -i /etc/passwd

     
    • mbnoimi

      mbnoimi - 2016-05-17

      Thanks, problem solved.

      May you please explain to me why this happen?! I didn't touch /etc/passwd permission at all (my server still fresh)

       
  • Jamie Cameron

    Jamie Cameron - 2016-05-17
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2016-05-17

    I have no idea how that permission was set - only that Webmin doesn't do it.

     
  • Md. Tanvir Rahman

    Hi, I am getting the same problem. here is the out put

    lsattr /etc/passwd
    -------------e- /etc/passwd
    id -a
    uid=0(root) gid=0(root) groups=0(root)

    But i use this following command. Nothing Happen.

    chattr -i /etc/passwd

     

    Last edit: Md. Tanvir Rahman 2018-10-23

Log in to post a comment.

Auth0 Logo